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

怎么取出PagedDataSource 中数据要求不用控件Repeater、GridView、DataList

2012-02-14 
如何取出PagedDataSource 中数据要求不用控件Repeater、GridView、DataList如何取出PagedDataSource 中数据

如何取出PagedDataSource 中数据要求不用控件Repeater、GridView、DataList
如何取出PagedDataSource 中数据要求不用控件Repeater、GridView、DataList
  PagedDataSource ps = new PagedDataSource();
  ps.AllowPaging = true;
  ps.PageSize = 2;
  ps.CurrentPageIndex = pg - 1;
  ps.DataSource = XXXXXXX ;

要求不用控件Repeater、GridView、DataList输出ps数据

[解决办法]
好啊学习
[解决办法]
UP
[解决办法]
应该是会的人还没有来到呢
[解决办法]
PagedDataSource一般用在分页控件中,比如GridView、FromView中。如果控件开发人员需对自定义数据绑定控件提供分页支持,即可使用此类。
PropertyDescriptor pds=TypeDescriptor.GetProperties(ps);
Lable lableAllowPaging=new Label();
Controls.Add(labelAllowPaging);
labelAllowPaging.Text=allowPaging=pds["AllowPaging"].ToString();
其他属性用类似的方法都可取出来。


[解决办法]

引用楼主 chinacn101 的帖子:
如何取出PagedDataSource 中数据要求不用控件Repeater、GridView、DataList 
PagedDataSource ps = new PagedDataSource(); 
ps.AllowPaging = true; 
ps.PageSize = 2; 
ps.CurrentPageIndex = pg - 1; 
ps.DataSource = XXXXXXX ; 

要求不用控件Repeater、GridView、DataList输出ps数据

[解决办法]
PropertyDescriptor pds=TypeDescriptor.GetProperties(ps); 应该改为PropertyDescriptorCollection
[解决办法]
自定义分页控件。。。

[解决办法]
帮顶
[解决办法]
up
[解决办法]


[解决办法]
up
[解决办法]
我也顶啊
[解决办法]
up
[解决办法]
没用过
[解决办法]
//使用PagedDataSource来实现分页
PagedDataSource pds = new PagedDataSource();
pds.DataSource = Ds.Tables[0].DefaultView;
pds.AllowPaging = true;
pds.PageSize = 17;
Label1.Text = pds.Count.ToString();
pds.CurrentPageIndex = Convert.ToInt32(this.labPage.Text) - 1;
Repeater1.DataSource = pds;
LabCountPage.Text = pds.PageCount.ToString();
labPage.Text = (pds.CurrentPageIndex + 1).ToString();
[解决办法]

那就从数据源 ps.DataSource 直接取数据。

既然数据源都有了, 拿ps何用?
[解决办法]
探讨
引用楼主 chinacn101 的帖子:
如何取出PagedDataSource 中数据要求不用控件Repeater、GridView、DataList
PagedDataSource ps = new PagedDataSource();
ps.AllowPaging = true;
ps.PageSize = 2;
ps.CurrentPageIndex = pg - 1;
ps.DataSource = XXXXXXX ;



要求不用控件Repeater、GridView、DataList输出ps数据
感觉没多大意义,它本身就是一个…


[解决办法]
楼主想怎么显示
[解决办法]
顶啊
[解决办法]
楼主,我纯粹是来接分的,你在另外一个帖子里叫我过来帮你顶一下的
[解决办法]
呵呵,不玩Asp.net好多年。。

热点排行