Donate

Highlight ASP.NET Web Forms GridView Row Using JavaScript

Here's the code on how to highlight an ASP.NET Web Forms GridView row using JavaScript.
  if(e.row.rowtype == DataControlRowType.DataRow)  
  {  
     e.Row.Attributes.Add("onclick","document.getElementById('"   
    + e.Row.ClientID + "')  
     .style.backgroundColor = 'green';");  
  }  

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Pass GUID As Parameter To Action Using ASP.NET MVC ContribGrid