In your onClick event for the button, reference the GridView's SelectedValue
property to get the ID of the selected row. This would be something like this:
MyGridView.SelectedValue
Hope that works.
--
Mohamad Elarabi
Lead Developer. MCTS, MCPD.
"MitchW" wrote:
Quote:
Hello,
I have a GridView that is bound to a SQLDataSource. I have enable item
selection on this GridView. I have a button on this .aspx page which does
some work on a different table that what the gridview (SQLDataSource) is
bound to. In order for the button to do its work I need the identity value of
the currently selected item in the GridView or from the SQLDataSource for the
OnClick of the button. How can I get that?
thanks,
mitch |