zoukankan      html  css  js  c++  java
  • c# combobox 绑定报错

    comboBoxPlanResult.DataSource =new BindingSource(o,null);
    comboBoxPlanResult.DisplayMember
    ="Key";
    comboBoxPlanResult.ValueMember
    ="Value"
    ;

    DataGridView  类,ListBox等控件支持标准的   Windows   窗体数据绑定模型。这意味着数据源可以是实现下列接口之一的任何类型:   
    IList   接口,包括一维数组,ArrayList也是。   
    IListSource   接口,例如,DataTable   和   DataSet   类。   
    IBindingList   接口,例如,BindingList   类。   
    IBindingListView   接口,例如,BindingSource   类。   
    如果把其它的东西当做数据源,就会出现上面的错误。   

  • 相关阅读:
    CSU 1122
    CSU 1256
    CSU 1240
    HDU 1874
    CSU 1004
    Problem F CodeForces 16E
    Problem E CodeForces 237C
    Problem C FZU 1901
    12-30
    2016-12-29
  • 原文地址:https://www.cnblogs.com/zhangzhu/p/3230166.html
Copyright © 2011-2022 走看看