Telerik Forums
KendoReact Forum
1 answer
202 views

I'm trying to concatenate two values into the textField property for FormComboBox, but it doesn't allow me. Instead I get an error:

Uncaught runtime errors:
ERROR
_utils__WEBPACK_IMPORTED_MODULE_2__.getItemValue(...) is undefined

My code is below. Perhaps someone can help?

<Field
	key={'personU'}
	id={'personU'}
	name={'personU'}
	label={'U'}
	textField={'abc' + 'def'}
	dataItemKey={'uic'}
	placeholder={'U...'}
	component={FormComboBox}
	allowCustom={true}
	data={units}
	virtual={{
		total: uCount,
		pageSize: uPageSize,
		skip: page
	}}
	onPageChange={pageChange}
	/>

 I've tried the following:

textField={'abc' + 'def'}
textField={`${abc} ${def}`}

Konstantin Dikov
Telerik team
 answered on 06 Sep 2023
1 answer
92 views

Hi !

I was wondering if someone already managed to link the Kendo Form to a sort of generated code objects from an OAS file.

Based on research on the web, there are many ways to generated code from a OAS yaml file.

Since we are using Kendo React (without Typescript) and Axios for the API calls, I found two ways:

- open-api specs generator typescript-axios: The problem is that will result in a project mixing plain javascript and typescript;

- take advantage of the Kendo integration with redux: Use redux-toolkit => rtk-query code generation functionality to generate the files then configure it to use Axios. That solution would require lots of refactoring in the application. And, again, there would be a mix with Typescript.

I would be grateful if you could share ideas, solutions or past experiences concerning that subject.

 

Best regards

Konstantin Dikov
Telerik team
 answered on 06 Sep 2023
1 answer
3.5K+ views

I am learning React, and have a very simple React application. When I follow the Getting Started steps for the Grid, I immediately get these errors when I add the <Grid> element to my application.

TS2786: 'Grid' cannot be used as a JSX component.   Its instance type 'Grid' is not a valid JSX element.
Type 'Grid' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, and 2 more.

TS2607: JSX element class does not support attributes because it does not have a 'props' property.


import React from 'react';
import { Grid, GridColumn } from "@progress/kendo-react-grid";

const App: React.FC = () => {
	return (
		<Grid data={products}>
			<GridColumn field="ProductName" />
			<GridColumn field="UnitPrice" />
			<GridColumn field="UnitsInStock" />
			<GridColumn field="Discontinued" />
		</Grid>
	);

}

export default App;

Filip
Telerik team
 answered on 05 Sep 2023
1 answer
78 views
Hi Friends,

I'm attempting to create a kendo table with a selection checkbox cell and a drag hand cell on Row. which will allow the user to drag each table row by maintaining their selections as well.

Currently I implemented some code but it's creating some duplicate records while dragging and dropping.

Please find stackblitz URL for same

https://stackblitz.com/edit/react-8rerrr?file=app%2Fmain.tsx

c
an anyone help me to figure this issue
Wissam
Telerik team
 answered on 05 Sep 2023
1 answer
57 views
I need to edit the texts displayed in the grid.
The code I currently have is the following:
<div className="grid-component">
      <Grid
        filterable={false}
        resizable
        sortable
        {...dataState}
        data={lcatData}
        onDataStateChange={dataStateChange}
        fixedScroll
        pageable={pageConfig}
      >
        {/* <GridNoRecords>Custom message</GridNoRecords> */}
        <Column field="ID1" title=" " width="50px" cell={CustomLinkCell} />
        <Column field="ID2" title="#" width="50px" cell={CustomPinnedCell} />

        <Column
          field="isCustomRec"
          title="Data type"
          width="100px"
          cell={CustomDataTypeCell}
        />

        {columns.map((column, index) => {
          return (
            <Column
              field={column.field}
              title={column.title}
              key={index}
              width={column.width}
            />
          );
        })}
      </Grid>
How can I add the message property in react grid? Where can I get the keys to complete the property?

Thanks for the help!
Wissam
Telerik team
 answered on 05 Sep 2023
1 answer
84 views
Hello Telerik, does the multiselect component have the ability to suggest a search like autocompletebox does? Or does autocompletebox have multiselect mode? and is it possible to do something from this at the moment?
Vessy
Telerik team
 answered on 04 Sep 2023
1 answer
231 views
Hello,

Some of our users prefer to type the date instead of selecting it in the datepicker. 
When user starts typing data, they usually starts with Date, then month and then Year.

One of your user is trying to enter leap year date in the picker and Kendo datepicker is defaulting to 28th Feb.
User typed 29 for day and when he typed 02 as month, it's changing date to 28 without waiting for year to be entered.

Is there a possibility to restrict this? We want no validation to happen until user enters the whole date. MUI datepicker works in the similar way. is there a way to achieve that in Kendo Datepicker?
Wissam
Telerik team
 answered on 04 Sep 2023
1 answer
74 views

Hi,

We have a use case in our project where we need to track changes made for the user to provide the batch edit functionality. So we have data and initialData initialized, data is passed to the grid and in onItemsChange we change only the data, and we never touch the initialData except if the data from the server comes back(we make new API call). 
But the initialData changes also when we change data.

Here is reproduced example that I got from your page and i just added initialData state. Here we can see that everything changes and not just data={data} that was passed to the grid and updated in onItemsChange function.

Demo: Demo from KendoReact examples

Is this the expected behaviour that initialData, data and even sampleproducts change even though i only want to modify data that was passed to grid, and the one modified in onItemsChange function.

Best regards

Konstantin Dikov
Telerik team
 answered on 02 Sep 2023
1 answer
46 views

Code sandbox which reproduces the error: pensive-galileo-ksx7nr - CodeSandbox (you need to click to expand a row, then you will have an inner grid, try to click on items inside and see how outer grid selection changes)

I have a Grid and in details row I have another grid (detailRow={MyCoponentWithAnotherGrid}). When I click on the row within the inner grid, also the outer grid fires the event onSelectionChange. It is normal but inside the event for this outer grid, I have info that the even was fired for the outer grid but the endRowIndex property of the event shows that the item clicked had index from the inner grid. Because of that, when I use 

getSelectedState({
          event,
          selectedState: selectedState,
          dataItemKey: DATA_ITEM_KEY,
        });

It returns me the new selection which selects the item under the same index as in the inner grid... but this event is in the outer grid. So If i have a grid like this:

- Item 1
  - Item 1.1
  - Item 1.2
-Item 2
and I click on "Item 1.2", then my outer grid selects the item "Item 2". Is this a bug? Can I somehow prevent event bubbling from the inner grid maybe as a workaround?
Konstantin Dikov
Telerik team
 answered on 02 Sep 2023
2 answers
215 views

Hello,

I'm having trouble with KendoReact Grid data. The data is in a complex JSON format, and I'm not sure how to properly display it on the grid. The JSON data changes dynamically, so I can't predetermine its structure for the return for this format.

 <GridColumn field="ProductID" title="ID" width="40px" />
 <GridColumn field="ProductName" title="Name" width="250px" />
 <GridColumn field="Category.CategoryName" title="CategoryName" />
 <GridColumn field="UnitPrice" title="Price" />
 <GridColumn field="UnitsInStock" title="In stock" />

 

I'm using the Map function to dynamically show the data, but it's leading to multiple instances of data being displayed as [object, object]

Can you offer some guidance on how to address this problem?

this is my code link.

https://stackblitz.com/edit/react-v7tmhx?file=app%2Fproducts.json,app%2Fmain.jsx

 

 

 

Doug
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 31 Aug 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?