Hi guys,
I have the following code on RowDataBound my gridview:
If (e.Row.RowType = DataControlRowType.DataRow) Then
e.Row.Attributes.Add("onkeydown", "javascript:ChangeRowColor('" & e.Row.ClientID & "')")
e.Row.Attributes.Add("onkeyup", "javascript:ChangeRowColor('" & e.Row.ClientID & "')")
e.Row.Attributes.Add("onclick", "javascript:ChangeRowColor('" & e.Row.ClientID & "')")
Dim lbl As Label = CType(e.Row.FindControl("BOD_NPRGSTA"), Label)
lbl.Attributes("onclick") = Page.ClientScript.GetPostBackClientHyperlink(GridView1, "Select$" & e.Row.RowIndex)
End If
I would use it to intercept the click on the row of GridView when I click on the Label lbl.
The problem I have because when I click on the same label me "smashing" the gridview itself. (He added a blank row for no reason).
Can you give me a straight please.