Telerik Forums
KendoReact Forum
1 answer
211 views
Hi!

By default  in the Calendar component, the weekends are set for Saturday and Sunday. The "isWeekend" property is read-only.

How can I set weekends to other days?
And how can I assign additional days, for example holidays, business trips, vacations, sick leave?
And highlight such days on the calendar in different ways.

How can I set the first day of the week, for example, Wednesday?

Best regards

Vessy
Telerik team
 answered on 11 Sep 2023
1 answer
196 views

Hello,

we have a few specific use cases that requires us to configure inCell editing in all cells, so text, numeric, date, and time (Time picker). We are using rowRender and cellRender that are defined in renderers file.
The problem which came to light was that on text and numeric it loses focus on change of value because it rerenders because dataItem changes for the given component, but in renderers in CellRender we capture focus again with input ref, so case for input and numeric text box works.
Problem is with DateRangePicker, on selecting any value it closes. So for example if I change the start value, I want it to remain open but instead it immedietaly closes because dataItem changes and we call onChange. Entering the input in DateInput of the picker results in same thing. We tried to programmatically call onBlur and control it's show property but it is just weird. OnBlur method of DateRangePicker is called on first clicking on value, and then every other value the method is not called until you close it which is expected behaviour expect for the onBlur on first click.

Ideally, we would like to use custom cells: https://www.telerik.com/kendo-react-ui/components/grid/cells/

And we tried to implement them with inCell editing but we ran into this issue.

We would like to define our data cell for showing data. And have custom cells for edit: {text, numeric, date} which are all inCell and use that throughout the project and that they behave as we would expect it. Is there an example or PoC in which there is InCell editing with custom cells that inlcude both text, numeric, date (DateRangePicker or DatePicker)?

Thank you for your help!

Konstantin Dikov
Telerik team
 answered on 11 Sep 2023
1 answer
396 views
I have single dataset. I want to create multiple sheets in the same excel file.   i tried this example.                                          https://www.telerik.com/forums/how-to-add-multiple-sheet-in-react-export.     But its not saving. i am trying in functional components. Kindly help. Thanks
Wissam
Telerik team
 answered on 08 Sep 2023
0 answers
313 views

I recently upgraded my node version from 14 -> 18.

After the upgrade, i started getting incompatible props datatype errors like the one below. 

Can you please help me on how to fix this issue? I've spent so much time debugging this. I'd appreciate any help. Thanks in advance!

 

Error

TS2769: No overload matches this call.
  Overload 1 of 2, '(component: AnyStyledComponent): ThemedStyledFunction<any, any, any, any>', gave the following error.
    Argument of type 'typeof Editor' is not assignable to parameter of type 'AnyStyledComponent'.
      Type 'typeof Editor' is not assignable to type 'StyledComponent<any, any, any, never>'.
        Type 'typeof Editor' is not assignable to type 'string'.
  Overload 2 of 2, '(component: keyof IntrinsicElements | ComponentType<any>): ThemedStyledFunction<keyof IntrinsicElements | ComponentType<any>, any, {}, never>', gave the following error.
    Argument of type 'typeof Editor' is not assignable to parameter of type 'keyof IntrinsicElements | ComponentType<any>'.
      Type 'typeof Editor' is not assignable to type 'ComponentClass<any, any>'.
        Types of property 'contextType' are incompatible.
          Type 'React.Context<any> | undefined' is not assignable to type 'import("/source/app/node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index").Context<any> | undefined'.

 

Code

import { Editor } from '@progress/kendo-react-editor';
import styled from 'styled-components';

export const EditorContainer = styled(Editor)`
  &.k-editor {
    border: none;
    background-color: inherit;
  }

  &.k-editor > .k-toolbar {
    border: none;
    padding-left: 0px;
  }
`;

rex
Top achievements
Rank 1
 asked on 08 Sep 2023
0 answers
140 views

In your Chapter 04 video #3

I'm trying to change this JSX from:

              <select className="form-control" defaultValue={newItem.typeStr} onChange={(e) => onFieldChange(e, "typeStr")} name="itemType">
                {itemTypesProvider.map((t) => {
                  return (
                    <option key={t} value={t}>
                      {t}
                    </option>
                  );
                })}
              </select>

 

To its equivalent: 

              <DropDownList
                data={itemTypesProvider} defaultValue={newItem.typeStr}
                onChange={(e) => onFieldChange(e, "typeStr")}
                name="itemType"></DropDownList>

 

As you can see, the expression to map the itemTypesProvider array is missing from the KendoReact component.

Adding a child, between the the <DropDownList></DropDownList> tags is not permitted.

              <DropDownList
                data={itemTypesProvider} defaultValue={newItem.typeStr}
                onChange={(e) => onFieldChange(e, "typeStr")}
                name="itemType">Anything between the opening and closing tags results in an error</DropDownList>

 

(Please see attachment)

How do I get the itemTypesProvider items to populate my DropDownList?

Doug
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 07 Sep 2023
1 answer
378 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
198 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
4.9K+ 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
175 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
137 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
Narrow your results
Selected tags
Tags
General Discussions
Grid
Wrappers for React
Charts
Scheduler
Filter 
DropDownList
Form
Styling / Themes
DatePicker
Editor
TreeList
Styling
PDF Processing
ComboBox
Excel Export
Dialog
Input
TreeView
Upload
Drawer
Button
Drag and Drop
MultiSelect
Tooltip
Accessibility
NumericTextBox
Checkbox
Menu
Gantt
DateTimePicker
PDF Viewer
Popup
Window
AutoComplete
DateInput
Sortable
Data Query
Licensing
TabStrip
Drawing
Calendar
Pager 
Labels 
Localization
TimePicker
GridLayout
FontIcon
Animation
PanelBar
TaskBoard
PivotGrid
Card
DropDownButton
Conversational UI 
DateRangePicker
Splitter
Badge 
Security
Slider
Spreadsheet
ContextMenu
MultiViewCalendar
Stepper
MultiColumnComboBox
MultiSelectTree
TextBox
AppBar
File Saver
ListView
MaskedTextBox
RadioButton
Switch
TextArea
Toolbar
DropDownTree
TileLayout
Map
Avatar
Date Math
Gauge
RadioGroup
RangeSlider
Rating
Loader
ExpansionPanel
SvgIcon
Typography
ProgressBar
ScrollView
Popover
StockChart
RadialGauge
Server Components
AIPrompt
Page Templates / Building Blocks
AI Coding Assistant
Chat
ColorGradient
ColorPalette
ColorPicker
Notification
Ripple
Skeleton
ButtonGroup
Chip
ChipList
FloatingActionButton
SplitButton
ActionSheet
Barcode
QR Code
FlatColorPicker
Signature
BottomNavigation
BreadCrumb
StackLayout
Timeline
ListBox
ChunkProgressBar
Sparkline
FileManager
ArcGauge
CircularGauge
LinearGauge
ExternalDropZone
OrgChart
Sankey
VS Code Extension
InlineAIPrompt
SpeechToTextButton
Chart Wizard
Agentic UI Generator
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?