How to highlight row on mouse hover in Gridview - ASPMANTRA | Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server AND WCF snippets and tutorial

How to highlight row on mouse hover in Gridview

Introduction: In this post I will explain how we can highlight the Gridview row on mouse hover in

Add the below mention style in Head tag of .aspx page:
  <style type="text/css">
        #grdstudentdetail tr.Hover:hover
                background-color:#2b98d9 ;   

After that add the Cssclass and Rowstyle-Cssclass in Gridview as shown below:

<asp:GridView ID="grdstudentdetail" runat="server" AutoGenerateColumns="False" CssClass="Hover" RowStyle-CssClass="Hover"

Now run the project and check the result.

Related Articles on Gridview:

Ø  How to bind Gridview using Sqldataadapter, Datatable andQuery in

Ø How to Bind gridview with datareader in

Ø  How to edit and update Dropdownlist in Gridview datacontrol in

Ø  How to Search Records in Gridview in

Ø  How to Bind Gridview using Store Procedure, SqlDataAdapterand Datatable in

Ø  How to use RadioButtonList control inside the Gridview

  ØHow to use Fileupload control in Gridview

Is it helpful?

If yes post your comment to admire my work. You can like me on Facebook, Google+, Linkedin and Twitter via hit on Follow us Button and also can get update follow by Email.

What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.