Forum /
Ext JS Community Forums 4.x /
Ext: Q&A /
Answered: highlight grid row
Answered: highlight grid row
I have a grid and want to highlight the row that has most recently been edited on the grid. Should I use the update event on the store? For some reason I cant get the event to fire. Please help with an example on how to do it.
Best Answer Posted by
jpatel3
you have to add below in your grid's definition
......
viewConfig: {
getRowClass: function (record, index, params, store) {
return store.getNewRecords().indexOf(record) >= 0 ? 'modified-row-cls' : '' ;
}
},
.......
and stylesheet will be -
.modified-row-cls.x-grid-cell
{
background-color : #FFFFCC ;
}
you have to add below in your grid's definition
......
viewConfig: {
getRowClass: function (record, index, params, store) {
return store.getNewRecords().indexOf(record) >= 0 ? 'modified-row-cls' : '' ;
}
},
.......
and stylesheet will be -
.modified-row-cls.x-grid-cell
{
background-color : #FFFFCC ;
}
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us