首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

PagedDataSource的数据源必须是 DataView吗?该如何处理

2012-02-01 
PagedDataSource的数据源必须是 DataView吗??DataSetdsnewDataSet....PagedDataSourcepsnewPagedDataSo

PagedDataSource的数据源必须是 DataView吗??
DataSet   ds=new   DataSet;
....
PagedDataSource   ps   =   new   PagedDataSource();
ps.DataSource   =   ds.Tables[ "tab "].DefaultView;

是不是一定要这样写?
我写
ps.DataSource   =   ds.Tables[ "tab "];

ps.DataSource   =   ds;
都会出错,   请问是什么原因呢

为什么   DataGrid   用以上三种方法都不会错??

[解决办法]
ps.DataSource = ds.Tables[ "tab "];

Ok

热点排行