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 Test Or Check Dead Pixels And Backlight Bleed On Your Monitor Using Dead Pixel Checker In Windows 11

How To Insert Or Add Emojis In Microsoft Teams Status Message