Hello,
I want to display a kendo react grid with in cell editing. Two of these columns should display a dropdown list when cells are editing. I cannot make it work. I started with:
https://www.telerik.com/kendo-react-ui/components/grid/editing/editing-in-cell/:
And then added a custom cell based upon:
https://stackblitz.com/edit/react-grid-dropdown-editor
My issue is that when i click on any cell of on of these two "special" columns, nothings happens.
The grid is defined by:
return (
<div>
<Grid
data={this.state.data}
onItemChange={this.itemChange}
cellRender={this.renderers.cellRender}
rowRender={this.renderers.rowRender}
editField="inEdit"
>
....
<Column field="TypeMO" title="TypeMO" cell={(props) => <CustomCell {...props} values={this.state.derogDataValues} />} />
....
</Grid>
....
The custom cell is defined by
export default class CustomCell extends GridCell {
handleChange(e) {
this.props.onChange({
dataItem: this.props.dataItem,
field: this.props.field,
syntheticEvent: e.syntheticEvent,
value: e.target.value
});
}
render() {
const dataValue = this.props.dataItem[this.props.field];
if (!this.props.dataItem.inEdit || this.props.dataItem.inEdit !== this.props.field) {
return (
<td>
{!dataValue || dataValue === null ? '' : dataValue.toString()}
</td>
);
}
return (
<td>
in edit
</td>
);
}
"in edit" is never displayed.
I must be missing something obvious :)