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

Maintaining dirty cell marker on paging

7 Answers 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 14 Mar 2012, 04:04 AM
In the grid editing demo (http://demos.kendoui.com/web/grid/editing.html), on changing the value of a cell, a dirty marker is displayed. If you switch to a different page and then back, the marker is not displayed.

This feels like a bug as on using the 'Save changes' button, the dirty changes are pushed to the server - my take is that the grid is aware of the changed cells and should be able to render the dirty marker.

7 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 15 Mar 2012, 09:46 AM
Hello Joel,

Indeed this behavior is by design and is true only if you are not using server paging. In case of server paging the updated data(but not submitted yet) will be lost.

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joel
Top achievements
Rank 1
answered on 15 Mar 2012, 01:14 PM
Agreed. But my concern isn't around the loss of updated data. It's around the UI marker that disappears when you go across pages when you are not using server paging (as is the case in the demo).
0
Nikolay Rusev
Telerik team
answered on 16 Mar 2012, 09:39 AM
Hello Joel,

I understand your point. In order to show "dirty flag" every time the grid is rebound it will have to iterate through all the model, check all field if changed and visible in the grid cells. This might cause performance hit to be verified on very rebind.

We haven't received much requests on this so far, so I suggest you to vote in our user voice this feature.

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joel
Top achievements
Rank 1
answered on 16 Mar 2012, 04:13 PM
Nikolay, great points and analysis.

The perf hit is something I'm willing to take on and was hoping to do it via a grid row template. What would be the recommended way to check if a cell is dirty?
0
Nikolay Rusev
Telerik team
answered on 19 Mar 2012, 11:17 AM
Hello Joel,

Currently you cannot verify whether given column has changed or not inside row template.

Greetings,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Steven
Top achievements
Rank 1
answered on 03 May 2012, 03:45 PM

I have a similar situation, however, in my case, is it possible to bind the dirty marker to a property?   I have an object that has an IsUpdated property for every field.   I would like to bind the dirty indicator to this as well as have it set to true when a change has been made.

Is this possible?
RowSet: {
    ColumnDim: "Value",
    RowCount: 2,
    Rows: [
        {  
            IsUpdated: false,
            Selections: [
                { ID: "Demand", Name: "Demand", Value: "Demand" },
            ],
            Columns: [
                { Value: 0, IsUpdated: false },
                { Value: 0, IsUpdated: false },
                { Value: new Date(), IsUpdated: false },
                { Value: "", IsUpdated: false },
                { Value: 0, IsUpdated: false },
                { Value: 0, IsUpdated: false },
            ]
        }
    ]
}




0
Nikolay Rusev
Telerik team
answered on 04 May 2012, 09:51 AM
Hello Steven,

Every model instance in the DataSource have field dirty which determines whether any of the fields has changed.

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