How do I bind a ComboBox so the displaymember is concat of 2 fields of source datatable?

后端 未结 7 1999
既然无缘
既然无缘 2020-12-01 18:03

I\'d like to bind a ComboBox to a DataTable (I cannot alter its original schema)

cbo.DataSource = tbldata;
cbo.DataTextField = \"Na         


        
7条回答
  •  日久生厌
    2020-12-01 18:45

    You can register the combo binding event and iterate the items, setting each item text to the desired fields using the combobox item data item.

提交回复
热议问题