GridView Multiple Select Buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good morning!

How do I determine which SELECT button was clicked in a GridView?

The multiple SELECT buttons will be used for an application approval process.

Thank you in advance for your support in this matter.
 
Thank you for the alternative method in establishing an approval process.

However, could you provide me with an idea on how to accomplish determining
which SELECT button was clicked within a GridView.

Again, thanks!
 
Terry <[email protected]>'s wild thoughts were
released on Mon, 13 Mar 2006 08:15:27 -0800 bearing the
following fruit:
Good morning!

How do I determine which SELECT button was clicked in a GridView?

The multiple SELECT buttons will be used for an application approval process.

Thank you in advance for your support in this matter.

Use SelectedRow

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
GridView1.SelectedIndexChanged
' Get the currently selected row using the SelectedRow
property.
Dim row As GridViewRow = GridView1.SelectedRow
Page.Title = "You selected " & row.Cells(1).Text
End Sub

Jan Hyde (VB MVP)
 
Phillip, currently I am using several SELECT buttons in my GridView. As a
result, I am trying to determine which SELECT button within the Gridview was
clicked.

Again, could you provide a VB sample code for this solution.

Thank you for your assistance.
 
When you say "several SELECT buttons", do you mean one Select button per
GridView row or more than one Select button per row?

If the former then the previous MSDN link I posted applies.

But, if you mean more than one Select button per GridView row, then you are
not using this command properly. There should be only one Select button per
GridView row. Consider the ButtonField; each ButtonField performs a specific
command based on its CommandName property.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield(VS.80).aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top