Javascript to color Gridview cells based on value
Think that you have to apply a color for a cell and the cell values are " Yes " or " No " put the following Javascript and the Style withing the head tags <style type="text/css"> .PendingRowStyle { padding: 2px; border: solid 1px #c1c1c1; color: Black; background-color:#ffcccc; } </style> <script language="javascript" type="text/javascript"> function ColourCell() { var Grid = document.getElementById("<%=GridView1.ClientID %>"); if (Grid != null) { for (i = 0; i < Grid .rows.length; i++) { var cell = Grid .rows[i].cells; if (cell != null) ...