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

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.