c# - the color of the first row in gridview is not changing -


ive got gridview in asp.net webpage , backcolor of row changed according data in specific cell, first row of grid not changing. why this? here code use change color:

protected void gridview1_rowdatabound(object sender, gridviewroweventargs e) {      if (e.row.rowtype == datacontrolrowtype.datarow)       {         int stationstatus1 = int32.parse(gridview1.datakeys[e.row.rowindex].values[0].tostring());                     foreach (gridviewrow row in gridview1.rows)         {             switch (stationstatus1)             {                 case 0:                 case 3:                    e.row.backcolor = system.drawing.color.red;                                            break;                                     case 12:                                            e.row.backcolor = system.drawing.color.blue;                                             break;                 default:                     e.row.backcolor = system.drawing.color.white;                     break; 

any highly apreciated. thanks


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -