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

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

c# combobox 绑定报错的更多相关文章

  1. Vue2.0 Props双向绑定报错简易处理办法

    在写项目的时候遇到了一个报错问题,虽然功能是正常运行,chrome的提示是:[Vue warn]: Avoid mutating a prop directly since the value wil ...

  2. (复习)父子组件传值使用v-modal双向绑定,报错Avoid mutating a prop directly解决方案

    报错:Avoid mutating a prop directly since the value will be overwritten whenever the parent component. ...

  3. 实现combobox模糊查询的时候报错 InvalidArgument=“0”的值对于“index”无效

    因为要对combobox实现模糊查询,因为系统实现的匹配只能从左到右进行匹配,所以利用两个list来进行模糊匹配,主要代码如下: List<string> listOnit = new L ...

  4. 多次绑定DataGridView的DataSource会报错 NullReferenceExcepti

    最近做了一个winform的项目,数据绑定在datagridview中,datagridview中的数据需要删除,分页,更新等之类的操作,所以就涉及到了datagridview的重新绑定问题,而且这些 ...

  5. Winform知识汇总之多次绑定DataGridView的DataSource会报错 NullReferenceExcepti

    最近做了一个winform的项目,数据绑定在datagridview中,datagridview中的数据需要删除,分页,更新等之类的操作,所以就涉及到了datagridview的重新绑定问题,而且这些 ...

  6. [问题记录]cocos的lua绑定安装pyyaml报错

    描述:按照readme中的文档操作报错,提示python2.7没有安装,但是确实已经安装了,而且也设置环境变量成功了. 解决: 在D盘新建register.py的文件,内容如下: # # script ...

  7. 【spring cloud】spring cloud中启动eureka集群时候,发生端口已经绑定的报错The Tomcat connector configured to listen on port 8000 failed to start. The port may already be in use or the connector may be misconfigured.

    在分别设置 进行微服务eureka集群启动时候,执行命令行启动jar包时候,报错前面一个端口8000已经被使用,而我这里启动的配置文件中端口号是8001,怎么会导致端口冲突呢?? 但是报错我的端口冲突 ...

  8. Combobox绑定泛型字典时提示“复杂的 DataBinding 接受 IList 或 IListSource 作为数据源”的解决方法

    一般情况下我们会将 DataTable 或 DataView 绑定到 Combobox 控件上,这时候进行数据绑定是没有问题的,因为DataTable 和 DataView 都继承了 IList 接口 ...

  9. Windows 7上执行Cake 报错原因是Powershell 版本问题

    在Windows 7 SP1 电脑上执行Cake的的例子 http://cakebuild.net/docs/tutorials/getting-started ,运行./Build.ps1 报下面的 ...

随机推荐

  1. C语言訪问MySQL数据库的方法

    1.加入头文件路径(MySQL安装路径中的include路径) 2.加入库文件(直接从MySQL安装路径中copy libmysql.lib就可以) 3.编程操作数据库 代码 // AccessToM ...

  2. 定时登录下载sftp服务器上的某些有规则的文件

    [root@1-live duizhangdan]# cat wget.sh #!/bin/bash#定时下载sina sftp服务器上的bak_dir=`date -d"5 day ago ...

  3. MySQL Study之--MySQL下图形工具的使用(MySQL Administrator)

    MySQL Study之--MySQL下图形工具的使用(MySQL Administrator) 系统环境:     操作系统: Windows  7(64) 下载地址:http://www.soft ...

  4. jQuery判断复选框是否勾选

    一个功能复选框勾选时给input表单赋值,复选框取消时将表单值清除. 功能:复选框勾选时给input表单赋值,复选框取消时将表单值清除. 实现源码:cyfID为复选框的id $("#cyfI ...

  5. Xilinx ISE Design Suite 14.7 ISim 简单仿真

    1.创建完项目(以Xilinx ISE Design Suite 14.7开发流程的例子    led例子   为例),编译通过,我们就可以对这个项目进行仿真: 2.然后切换到simulation,然 ...

  6. ISE和Modelsim联合仿真(详细步骤讲解)

    ISE和Modelsim联合仿真(转) 地址:http://www.cnblogs.com/feitian629/archive/2013/07/13/3188192.html 相信很多人会遇到过这个 ...

  7. Effective JavaScript Item 46 优先使用数组而不是Object类型来表示有顺序的集合

    本系列作为Effective JavaScript的读书笔记. ECMAScript标准并没有规定对JavaScript的Object类型中的属性的存储顺序. 可是在使用for..in循环对Objec ...

  8. 每日英语:Skull Shakes Up Human Family Tree

    A newly discovered 1.8 million-year-old skull offers evidence that humanity's early ancestors emerge ...

  9. 每日英语:Can Going In and Out of Air Conditioning Cause Colds?

    For most people, summer involves numerous daily shifts between scorching outdoor heat and frosty air ...

  10. 从JDBC程序看为什么需要Mybatis

    package com.xuebusi.jdbc; import java.sql.*; /** * 从JDBC程序看为什么需要Mybatis * * 1.加载驱动程序和数据库连接所需要的url.用户 ...