This is a migrated thread and some comments may be shown as answers.

Regarding Inline Edit

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Basim
Top achievements
Rank 1
Basim asked on 27 Nov 2019, 12:21 PM

I'm using Kendo react inline editing feature.This is my code...

 

cancel = dataItem => {
    const originalItem = this.state.DataSet.find(p => p.id === dataItem.id);
    const data = this.state.DataSet.map(item =>
      item.id === originalItem.id ? originalItem : item
    );
    this.setState({ DataSet: data, errors: [] });
    this.DataList();
  };

 

In this cancel method i'm calling this.DataList() which is a get request to the server. If i remove this line of code the inEdit is not closing.......So how can i close the inline method without writing this line?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Nov 2019, 08:52 AM

Hello, Basim,

The edit mode of the row depends on the value of the edit field:

https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/#toc-editfield

When looping through the items with the map method set the edit field to false for the current row.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Basim
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or