Combobox databinding showing system.data.datarowview

后端 未结 7 1575
猫巷女王i
猫巷女王i 2021-01-01 00:08

I am binding combobox with datasource, displaymember, valuemember. It is working fine in my computer but it is not working in clients pc. Following is my source code:

<
7条回答
  •  春和景丽
    2021-01-01 00:23

    setting the DisplayMember and ValueMemeber after setting the DataSource fixed this issue for me.

    cbxMetal.DataSource = dt;
    cbxMetal.DisplayMember = "alloyName";
    cbxMetal.ValueMember = "alloyId";
    

提交回复
热议问题