Jump to content

Selecting a row on a gridview with delete button

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Couly

Couly

    Newbie

  • Members
  • Pip
  • 2 posts
  • LocationDublin
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:

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
	  


#2
Couly

Couly

    Newbie

  • Members
  • Pip
  • 2 posts
  • LocationDublin
ok thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users