今天用dev的gv控件,自带分页样式感觉不满足要求,自己改了模版,可以无奈不知道怎么去给里面的分页设置ItemsPerPage="10" ItemCount="23"除了写死,找不到个好地方,绑定时设置一直findcontrol报null无奈啊:
- <dx:ASPxGridView ID="dxGVTerminalFaults" SkinID="gridviewSkin" runat="server">
- <Templates>
- <PagerBar>
- <div class="clear_float">
- <dx:ASPxLabel ID="lblCustomArea" runat="server" CssClass="left_float num_total" Visible="true" Text="6 faults" />
- <div class="nav_pager right_float">
- <dx:ASPxPager ID="ASPxPager1" runat="server" ItemsPerPage="10" ItemCount="23">
- <Summary Text="Page {0} of {1}" />
- </dx:ASPxPager>
- </div>
- </div>
- </PagerBar>
- </Templates>
- <Columns>
- <dx:GridViewDataTextColumn Caption="Terminal ID" FieldName="TermId">
- </dx:GridViewDataTextColumn>
- <dx:GridViewDataTextColumn Caption="Fault" FieldName="Fault_Description">
- </dx:GridViewDataTextColumn>
- <dx:GridViewDataTextColumn Width="120" CellStyle-HorizontalAlign="Center" Caption="Started At" FieldName="Recording_Time">
- <DataItemTemplate><%# DataBinder.Eval(Container.DataItem,"Recording_Time","{0:dd\\/MM\\/yyyy HH:mm:ss}") %></DataItemTemplate>
- </dx:GridViewDataTextColumn>
- <dx:GridViewDataTextColumn Width="120" CellStyle-HorizontalAlign="Center" Caption="Ended At" FieldName="Fault_Time">
- <DataItemTemplate><%# DataBinder.Eval(Container.DataItem, "Fault_Time", "{0:dd\\/MM\\/yyyy HH:mm:ss}")%></DataItemTemplate>
- </dx:GridViewDataTextColumn>
- <dx:GridViewDataTextColumn Width="120" Caption="Duration(Minutes)" FieldName="Duration">
- </dx:GridViewDataTextColumn>
- </Columns>
- </dx:ASPxGridView>
截图:
希望熟悉此东东的达人相助:-)
本文转自 xcf007 51CTO博客,原文链接:http://blog.51cto.com/xcf007/643296,如需转载请自行联系原作者