热门搜索:Photoshop 平面设计 Linux Vista Windows ASP.NET qq word 病毒 XP Excel 标志设计 

使用 ASP.NET Atlas PageNavigator控件实现客户端分页导航

来源:佚名(读取中...) 2006-4-19 【字体: 】 切换为

第四部分: DataNavigator控件以及命令按钮。注意到这里我们有四个按钮,每一个都有不同的commandName属性,也分别对应着DataNavigator对DataView的一种操作。同时这些按钮的parent属性都设置成了这个DataNavigator对象。

<dataNavigator id="pageNavigator" dataView="view"/>
<button id="BTnFirstPage" parent="pageNavigator" command="FirstPage" />
<button id="BTnPrevPage" parent="pageNavigator" command="PreviousPage">
    <bindings>
        <binding property="enabled" dataPath="hasPreviousPage"/>
    </bindings>
</button>
<button id="BTnNextPage" parent="pageNavigator" command="NextPage">
    <bindings>
        <binding property="enabled" dataPath="hasNextPage"/>
    </bindings>
</button>
<button id="BTnLastPage" parent="pageNavigator" command="LastPage" />
第五部分:两个Label,分别显示页面总数以及当前页的序号。

<label id="lblPageNumber">
    <bindings>
        <binding dataContext="view" property="text" dataPath="pageIndex" transform="Add"/>
    </bindings>
</label>
<label id="lblPageCount">
    <bindings>
        <binding dataContext="view" property="text" dataPath="pageCount"/>
    </bindings>
</label>
OK,在浏览器中测试一下:

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

关注此文的读者还看过:
    用户评论
评论内容:不能超过100字,需审核,请自觉遵守互联网相关政策法规。
发表评论: 匿名发表 用户名: loading 位网友发表了评论 查看评论
(0/100)