一个list集合列表绑入repeater进行分页
来源:互联网 发布:东华软件 公安部 编辑:程序博客网 时间:2024/05/01 13:10
刚开始有这个需求就在想,这样多麻烦了
首先要将list转换成table 然后还要用一个中间表来存放每次分页的数据
一想到这就觉得实在是太麻烦了 就在网上盲目的找看有没有什么简单可行的解决办法
还真让我找到了
protected void AspNetPager1_PageChanged(object sender, EventArgs e){ dataBind();}protected void dataBind(){ PagedDataSource pds = new PagedDataSource(); //要分页的list列表 List<Msg> list = MsgManager.getList(); AspNetPager1.RecordCount = list.Count; pds.DataSource = list; pds.AllowPaging = true; pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1; pds.PageSize = AspNetPager1.PageSize; this.DataList1.DataSource = pds; this.DataList1.DataBind();}
学海无涯啊 以前就一直没有用过这个类
- 一个list集合列表绑入repeater进行分页
- List集合进行界面分页
- 将list集合进行分页
- 通过List集合进行分页
- Repeater——列表+分页
- 对list列表分页
- List 集合分页实现
- List集合分页
- list集合分页
- java List集合分页
- List 集合分页实现
- Repeater 控件 进行无刷新分页
- 使用repeater控件进行分页代码
- 一个对List中的数据进行分页的工具类
- 对list进行分页
- 将list进行分页
- 巧去Repeater绑定项
- [struts]Validator对一个集合(list,数组)进行较验
- 深受启发的21个故事
- 如何去甄别一条网络传播消息的真假?
- HANDLE_##message
- I2C编程实例
- MeanShift运动目标跟踪 matlab程序
- 一个list集合列表绑入repeater进行分页
- 排序算法原来是这么排的
- 统计整理——frequency函数与直方图工具的使用
- ajax问题总结 比较全
- progressdialog的进度条显示有误问题
- 消息的同步发送,异步发送以及消息发送的可靠性
- JQuery 获取元素位置
- 读The C programming language的新发现
- linux下hostname修改机器名后,删除oracle实例报错