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

Dirty Indicator disappeared unexpected

2 Answers 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wanchang
Top achievements
Rank 1
Wanchang asked on 09 Jul 2015, 04:48 AM

I faced a problem about dirty indicator(the red triangle on the top left of a cell).

You could reproduce it by the following step by using the attached sample.

1.Focus a cell in "Product Name" column, and change the value.

2.Click the space area out of the grid.

You may notice that the dirty  indicator on "Product Name" and "Unit Price" cell twinkled and disappeared soon. This is not expected.Because I have changed the values of them.

 

But with the next scenario, dirty indicator will be displayed with a expected behavior.

1.Focus a cell in "Product Name" column, and change the value.

2.Click other cell  in the grid.

You may find that the the dirty  indicator will be displayed in the top left of the edited cell and a cell in "Unit Price".

 

In my sample, I created a handler to process the changed event for "Product Name".

And in the handler, a ajax request is posted. In the success method for the request, I change the value of "Unit Price" property of the same entity.

I think this is a familiar scenario, and will be used in my application.

I want to know if there is any way to keep displaying Dirty Indicator when I changed some value and click out of the grid.

2 Answers, 1 is accepted

Sort by
0
Wanchang
Top achievements
Rank 1
answered on 09 Jul 2015, 05:25 AM

PS:

You may check the sample file located in <./demo/grid> in the attached file.

0
Accepted
Boyan Dimitrov
Telerik team
answered on 10 Jul 2015, 03:10 PM

Hello Kiriya,

Basically current behavior is expected as when you use the set method to change a property in the model, the Grid rows are redrawn and dirty flags are removed (preserving the dirty flags is not supported out of the box). In current scenario I would suggest to choose one of the following options:

   - Implement custom solution to preserve dirty flags - you can use this demo in our CodeLibrary as a baseline
   - Extend current solution to first open a cell for editing (using editCell method) and then use the set method in order to avoid redrawing the Grid rows

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Wanchang
Top achievements
Rank 1
Answers by
Wanchang
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or