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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -