Search This Blog

Tuesday, February 28, 2012

To select any row in the GridView on click


use this code in the Gridview's RowCreated or RowDataBound events, U can use in any one of the events specified.
****************************************************************
If
e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Attributes.Add(
"onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))

End If
****************************************************************

No comments:

Post a Comment