ITPub博客

首页 > Linux操作系统 > Linux操作系统 > gridview分页变成上一页,下一页模式

gridview分页变成上一页,下一页模式

原创 Linux操作系统 作者:iDotNetSpace 时间:2009-01-14 16:39:22 0 删除 编辑

在pageTemplate 分页模板列中可以增加如下代码 就做到了 利用gridview自带分页,转换一种方式的分页哦!   

 
                           


                               
                                   
                               
                           

                                        第
                                        共
                                                                                    CommandName="Page" Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"
                                            Text="首页">

                                                                                    CommandName="Page" Enabled=" <%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"
                                            Text="上一页">

                                                                                    CommandName="Page" Enabled=" <%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                            Text="下一页">

                                                                                    CommandName="Page" Enabled=" <%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
                                            Text="尾页">

                                                                                    Width="20px">
                                                                                    CommandName="Page" Text="GO">
                                   

                       

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12639172/viewspace-539614/,如需转载,请注明出处,否则将追究法律责任。

下一篇: TreeView控件导航
请登录后发表评论 登录
全部评论

注册时间:2008-01-04

  • 博文量
    2376
  • 访问量
    5321511