Get Row Index from ListBox

concise

Newcomer
Joined
Jan 28, 2003
Messages
5
Hello there....

So I'm still learning over here... help much appreciated...

I have a list box that I have populated from a DataTable.

I want to get data from a row related to the listbox.selecteditem...

What's the best way to do this?

Here's the example:

My DataTable has 2 columns; AreaID and AreaName...

The listbox gets populated with the AreaName column. When i want to delete the entry from the listbox, I need to get the AreaID associated with this AreaName listbox entry. Of course the listbox.selectedindex does not correspond to the AreaID column in the dataset...

TIA.
 
Back
Top