Selecting a row on a gridview with delete button

Couly

New member
Joined
Jan 26, 2012
Messages
2
Location
Dublin
Hi,
I have a gridview which I can hover over the rows, and the background changes colour which is great. I also allow the user to choose a row by clicking on the gridview and moving to the next page. This works great, but if I want to delete a row, it Selects the row instead. Can anyone help? I have posted this code below:

Code:
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Attributes.Add("onmouseover", "this.style.cursor=hand; this.style.backgroundColor=YellowGreen;")
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=;")
e.Row.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" + e.Row.RowIndex.ToString))

End If
 
Back
Top