Sometimes we need to give attractive look to a GridView by highlighting rows.
Now the query is how to make row hightlight?
First define two css class as below :
Now we have to put the below code in row databound method of the gridview.
void GridView1_RowDataBound(Object sender, GridViewRowEventArgs e)
if(e.Row.RowType == DataControlRowType.DataRow)
Now you will get the highlighted row when mouse over.
Just run the application and check the output.
my gridview got lberpom with edit row state..so i figure out it must be involving alternate edit= 5i put a validation like this(e.Row.RowState = 4 OrElse e.Row.RowState = 5)to make it happened,#its microsoft rules we must follow,even though it's suck
How to remove underline for LinkButton in Gridview?