c# - Sort by backcolor on Gridview -


i have gridview this:

enter image description here

i change backcolors because if backcolor lightcoral, mean problem me , need see on top of gridview.

datetime dt;     if (datetime.tryparseexact(e.row.cells[1].text, "dd.mm.yyyy hh:mm",                               cultureinfo.invariantculture,                               datetimestyles.none, out dt))     {         if (dt < datetime.now.addhours(-102))         {             e.row.cells[1].backcolor = system.drawing.color.lightcoral;         }     } datetime dt2;     if (datetime.tryparseexact(e.row.cells[2].text, "dd.mm.yyyy hh:mm",                               cultureinfo.invariantculture,                               datetimestyles.none, out dt2))     {         if (dt2 < datetime.now.addhours(-140))         {             e.row.cells[2].backcolor = system.drawing.color.lightcoral;         }     } datetime dt3;     if (datetime.tryparseexact(e.row.cells[3].text, "dd.mm.yyyy hh:mm",                               cultureinfo.invariantculture,                               datetimestyles.none, out dt3))     {         if (dt3 < datetime.now.addhours(-280))         {             e.row.cells[3].backcolor = system.drawing.color.lightcoral;         }     } 

i need sort rows backcolor this:

enter image description here

any suggestion that?


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -