C# winforms listbox can't get the right value -
with listbox called lbcustomers, have following:
datatable customers = getallcustomers(); lbcustomers.datasource = customers; lbcustomers.displaymember = "lastname"; lbcustomers.valuemember = "cell";
the last names displayed. using following during event, getting second list box filled "system.data.datarowview"
if (lbcustomers.selecteditems.count > 0) { (int = 0; < lbcustomers.selecteditems.count; i++) { if (!listbox2.items.contains(lbcustomers.selecteditems[i])) { listbox2.items.add(lbcustomers.selecteditems[i]); } } }
i have multiple sources of data coming listbox2, want "cell" value selected lbcustomer items.
Comments
Post a Comment