SelectedIndexChanged

C

chawes40

Hi I'm new to asp.net and I have a couple of questions.. I have
datagrid with several columns. I have two Button Columns when I select
either one I go to the function:

private void datagrid1_SelectedIndexChanged(object sender,
System.EventArgs e)

How can I determine in this function if the Market button was selected
or the Exception button was selected?

If I were able to use the
(System.Web.UI.WebControls.DataGridCommandEventArgs e ) with
SelectedIndexChanged I could use e.CommandName to determine what button
was selected, but I can not use this method. Help!
 
T

Teemu Keiski

You are able to use ItemCommand if you have Select as command name
(CommandName="Select") in both of the buttons and then say button name as
command argument. (ItemCommand is raised before SelectedIndexChanged).
SelectedIndexChanged would be raised after this one.
 

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

Members online

No members online now.

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top