第一种:
DataSet ds=new DataSet ();
this.dataGridView1.DataSource=ds.Table[0]; 第二种:
DataTable dt=new DataTable();
this.dataGridView1.DataSource=dt; 第三种:
DataSet ds=new DataSet ();
this.dataGridView1.DataSource = ds.Tables["表名"]; 第四种:
DataSet ds=new DataSet ();
this.dataGridView1.DataSource = ds;
this.dataGridView1.DataMember = "表名"; 第五种:
ArrayList Al = new ArrayList();
this.dataGridView1.DataSource = Al; 第六种:
Dictionary<string, string> dic = new Dictionary<string, string>();
this.dataGridView1.DataSource = dic; 第七种:
DataView dv = new DataView();
this.dataGridView1.DataSource = dv; 第八种:
this.dataGridVi.DataSource = new BindingList<Object>(List<Object>);

最新文章

  1. curl常用选项详解
  2. windows上安装numpy,scipy
  3. oprofile 安装使用
  4. 6/3 Sprint2 看板和燃尽图
  5. online learning
  6. codeforces #313 div1 A
  7. C#数据采集类
  8. 在Laravel5.* 中使用 AdminLTE
  9. centos 64bit 安装与升级 chrome的方法
  10. IE6-能让png图片有透明效果的js代码
  11. spring4 之 helloworld
  12. JS函数参数
  13. WinRAR代码执行漏洞CVE-2018-20250
  14. ra (数论 , 莫比乌斯反演 , 整点统计)
  15. mysql 案例 ~ 分析执行完的大事务
  16. Laravel 5.2 INSTALL- node&#39;s npm and ruby&#39;s bundler.
  17. cocos代码研究(2)Label学习笔记
  18. Tomcat 基本配置
  19. JavaScript hash
  20. (转)IE=EmulateIE7 标签的作用

热门文章

  1. Maven 从svn下载后,pom.xml报错解决方案
  2. ionic的start-y属性初始化页面
  3. js实现全选反选功能
  4. [转载] javascript实现深度克隆
  5. 6、Android之LayoutInflater.inflate()
  6. Java 单列模式(Singleton)
  7. how-to-add-global-asp-net-web-api-filters
  8. Log4j简介
  9. HTML5的form表单属性
  10. UE4 Plugins插件分享: