unable to cast object of type system.string to type system.data.datarowview
I m getting this error. Firstly i have bind my list box with a cell in datagrid. when the row is selected the value of cell is is first assigned to a string variable and the that variable is then split near spaces stored in string array and that array is then assigned to list box.
After dat to assign multiple selected items to a label I used foreach loop as
foreach(datarowview row in listbox.selecteditems)
near datarowview m getting unable to cast object of type system.string to type system.data.datarowview exception.