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

Highlight new/ edited row?

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Elliott
Top achievements
Rank 1
Elliott asked on 28 Nov 2013, 02:10 PM
Hi,
I am trying to get the functionality seen here:
http://www.jtable.org/
If you add or edit a row, there is some nice css that highlights the row.

What I have tried so far (using the MVC wrappers):
.Events(e => e
        .Save("onSave")
)

function onSave(e) {
        var grid = $("#grid").data("kendoGrid");
        var id = e.model.ID;
        var uid = grid.dataSource.get(id).uid;
        $("#grid tbody").find("tr[data-uid=" + uid + "]").addClass("row-changed");
}

.row-changed {
        background-color: red;
 }

Nothing is happening :(
Thanks!

1 Answer, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 02 Dec 2013, 03:08 PM
Hi Elliott,

This scenario is not supported out-of-the-box by Kendo UI Grid, however you could try a custom implementation. As a possible approach I can suggest in the grid save event to get the updated row uid and set some custom styling to the aforementioned row in the dataSource sync event. For your convenience I prepared a simple jsBin example which demonstrates the suggested approach in action.

Regards,
Iliana Nikolova
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
Elliott
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Share this question
or