Closed GoogleCodeExporter closed 9 years ago
This is how I've done it
This grid will check a date in one of the columns called EndDate and check it
against the current time. If the end date is less than the current time, it
adds a class to the row, which is defined in css to make the row red.
Basically your using loadComplete and looping through the Tds of the column you
want, checking values, and applying classes to the rows.
$(".all").loadGrid({
inlineEditing:true,
stickyRows:false,
width:1100,
adding:true,
deleting:true,
loadComplete : function() {
var $grid = $(this);
$grid.getCol("EndDate").getTdsFromTh().each(function() {
var dateString = $(this).find(":input").val();
var end = new Date(dateString);
var now = new Date();
// expired
if(end < now) {
$(this).parents("tr").addClass("expired");
}
});
}
});
Original comment by Seancla...@gmail.com
on 17 Oct 2011 at 12:04
Thank u sir,
Wil u able to show this wit an example?
Original comment by saravana...@gmail.com
on 20 Oct 2011 at 9:00
I made a video on this
http://www.youtube.com/watch?v=Ey2z0HGskkg
Original comment by Seancla...@gmail.com
on 16 Nov 2011 at 5:34
Original issue reported on code.google.com by
saravana...@gmail.com
on 13 Oct 2011 at 10:59