views:

25

answers:

2

Hi All,

I am binding dataview to listbox. How to get the selected item.

Geetha

A: 

By the property YourListBox.SelectedItem.ToString()

Achraf
Not sure why you ToString() the result.
Goblin
A: 

Hi Achraf,

Thank you for the reply. I got the solution.

Code:

  DataRowView dv = lbResult.SelectedItem as DataRowView;
   string xx= dv.Row[1].ToString();

Geetha.

Geetha