您的位置:程序门 -> .net技术 -> c#



dataset.tables[“tablename”]赋值给datagridview1.datasource为什么为null?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


dataset.tables[“tablename”]赋值给datagridview1.datasource为什么为null?[已结贴,结贴人:alongman]
发表于:2007-03-01 15:22:40 楼主
我使用   this.datagridview1.datasource   =   datc.dset.tables[“tablename”];的方式datagridview1中无数据显示,而用
  this.datagridview1.datasource   =   datc.dset.tables[0];的方式则能显示出来。
什么原因呢?
发表于:2007-03-01 15:30:531楼 得分:0
tablename存在吗
   
*****************************************************************************
欢迎使用csdn论坛专用阅读器   :   csdn   reader(附全部源代码)  

最新版本:20070212

http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
发表于:2007-03-01 15:37:292楼 得分:0
存在,如果不存在前面就能catch到了,而且我跟踪了,就在赋值后datasource为null
发表于:2007-03-01 15:47:423楼 得分:10
foreach   (datatable   table   in     datc.dset.tables)
console.writeline(table.tablename   );

打出来看看

发表于:2007-03-01 15:53:334楼 得分:0
dadapter.fill(dset,   "persontalbe ");

md,真是弱智问题!

谢谢   feiyun0112


快速检索

最新资讯
热门点击