Get SelectedItems from database fed ListBox
问题 I need to get values from selected items from listbox which is binding from database. But if I try listBoxAtribute.SelectedItems[0].ToString() it returns System.Data.DataRowView Is there any way to convert Data from DataRowView to string ? My idea looks like this: for(int i = 0; i < listBoxAtribute.SelectedItems.Count; i++) { MessageBox.Show(listBoxAtribute.SelectedItems[i].Tostring); } Thanks a lot for any reply. 回答1: Try casting selected item of listbox to DataRowItem first and access