Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get value of datagrid selected item

Status
Not open for further replies.

gcole

Programmer
Aug 2, 2000
390
US
I have a sumbit button in my datagrid. When I trap the SelectedIndexChanged event, how do I get the value of what was selected?
Thanks
 
do you mean the Item that is CURRENTLY selected or was PREVIOUSLY selected?

For the Current you would use "myDataGrid.SelectedItem" to access the selected Item

To access the previously selected Item, you need to use the "BeforeSelect" event to access the Item that is about to lose its selection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top