PDA

View Full Version : Highlight updated rows/columns in grid?



lrayman
31 Jul 2013, 2:09 PM
I have a store that refreshes itself on a background timer. The refresh method polls the server, which only returns the updated rows. The store uses the load({addRecords:true}) method to poll. A grid on top of the store updates correctly when the load returns.

My question is: I would like to highlight the row/column that was updated. I've tried listening to the view's itemadd and itemupdate events, but they are not getting triggered.

Any ideas?

senthil41189
31 Jul 2013, 10:29 PM
Hi
Try using the viewConfig of the grid. This will be triggered when the grid reloads and you can add the row color to the particular records as given below:
viewConfig: {
getRowClass: function(record, index) {
var excelVal = document.getElementById('executeIssue').value;
var record1 = grid.getStore().getAt(index);
var iHierarchyID=record1.get("HIDDEN");
if(excelVal.contains(iHierarchyID.split("~")[0].trim())){
return 'row-colorExecute';
}else{
if (index % 2 == 0) {
return 'row-color';
}
}
}
}

the row-colorExecute is the CSS defined with your color of choice

Hope this Helped.....