Saturday, January 1, 2011

Highlight GridView row using javascript

Here's the code:
Code:
  if(e.row.rowtype == DataControlRowType.DataRow)  
  {  
     e.Row.Attributes.Add("onclick","document.getElementById('"   
    + e.Row.ClientID + "')  
     .style.backgroundColor = 'green';");  
  }  

0 comments:

Post a Comment