c# - ComboBox items are just a path -


why combobox item's path? when start appl. , want select item combobox, items path. it's every time same path, path class.

here code give combobox items:

drpdefcontval.items.addrange(controllertype.getall().toarray<controllertype>()); drpdefcontval.valuemember = ((controllertype = controllertype.getbyid(coreclass.settings.dbdefaultcontrollertypeid)) != null) ? controllertype.dbtitle : ""; 

value member 1 half of coin combo boxes.

you want specify data member. string property display list of items.

so within class assume string value want bind .

thus want set display member property so:

drpdefcontval.displaymember = "dbtitle"; 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -