Geeth
Geeth

Reputation: 5343

Listbox selecteditem problem wpf

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

Geetha

Upvotes: 0

Views: 555

Answers (2)

Geeth
Geeth

Reputation: 5343

Thank you for the reply. I got the solution.

Code:

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

Geetha.

Upvotes: 1

Achraf
Achraf

Reputation: 658

By the property YourListBox.SelectedItem.ToString()

Upvotes: 0

Related Questions