or
AllowPaging="False" |
AllowCustomPaging="False" |
EnableLinqExpressions="True" |
-OR- |
AllowPaging="False" |
AllowCustomPaging="True" |
EnableLinqExpressions="True" |
<telerik:RadGrid |
ID="grdNotes" |
runat="server" |
OnColumnCreated="grdNotes_ColumnCreated" |
OnItemCreated="grdNotes_ItemCreated" |
OnItemDataBound="grdNotes_ItemDataBound" |
OnNeedDataSource="grdNotes_NeedDataSource" |
AutoGenerateColumns="False" |
AllowPaging="True" |
AllowCustomPaging="True" |
ShowStatusBar="True" |
EnableLinqExpressions="True" PageSize="10" |
> |
<HeaderContextMenu |
EnableTheming="True"> |
<CollapseAnimation |
Type="OutQuint" |
Duration="200"> |
</CollapseAnimation> |
</HeaderContextMenu> |
<ClientSettings > |
<Selecting AllowRowSelect="True" /> |
<ClientEvents |
OnRowCreated="RowCreated" |
OnRowSelected="RowSelected" |
OnRowDblClick="grdNotes_OnRowDblClick"> |
</ClientEvents> |
</ClientSettings> |
<PagerStyle |
HorizontalAlign="Center" |
Position="Bottom" |
AlwaysVisible="True" |
Mode="NextPrevAndNumeric" |
Wrap="False" |
BackColor="White" |
Font-Size="Large" |
/> |
<MasterTableView |
HierarchyDefaultExpanded="true" |
HierarchyLoadMode="Client" |
AllowSorting="true" |
DataKeyNames="Id,ParentId" |
ClientDataKeyNames="Id,ParentId" |
Width="100%" |
AutoGenerateColumns="false" |
ShowHeader="true" |
NoDetailRecordsText="" |
enablenorecordstemplate="False" |
> |
<SelfHierarchySettings |
ParentKeyName="ParentId" |
KeyName="Id" |
MaximumDepth="20" /> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn visible="True"> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="Id" HeaderText="Id" SortExpression="Id" UniqueName="Id" ReadOnly="True"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title" UniqueName="Title"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Body" HeaderText="Body" SortExpression="Body" UniqueName="Body"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="CreatedBy" HeaderText="Created By" SortExpression="CreatedBy" UniqueName="CreatedBy"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Created On" SortExpression="CreatedDate" UniqueName="CreatedOn"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ModifiedDate" HeaderText="Modified On" SortExpression="ModifiedDate" UniqueName="ModifiedOn"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ParentId" HeaderText="Parent Id" SortExpression="ParentId" UniqueName="ParentId" visible="false"> |
</telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<FilterMenu EnableTheming="True"> |
<CollapseAnimation |
Type="OutQuint" |
Duration="200"> |
</CollapseAnimation> |
</FilterMenu> |
</telerik:RadGrid> |
protected void grdNotes_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
{ |
RefreshGridDataSource(); |
} |
private void RefreshGridDataSource() |
{ |
NoteDataProvider noteDataProvider = new NoteDataProvider(WebServicesUri, TicketIdentity.Current.Ticket); |
List<DisplayNote> displayNotes = noteDataProvider.GetAll(ObjectId); |
grdNotes.DataSource = displayNotes; |
grdNotes.VirtualItemCount = displayNotes.Count; |
} |
<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="50" AutoGenerateColumns="False" GridLines="None" Skin="Vista" ShowHeader="true" CommandItemStyle-Height="30px" Width="100%" HorizontalAlign="Center" AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated"> |
<MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" EnableNoRecordsTemplate="true" DataKeyNames="NETT_IS_ID,NETT_ID" Width="100%"> |
<SelfHierarchySettings KeyName="ID" ParentKeyName="IS_ID" /> |
<Columns> |
</Columns> |
<EditFormSettings> |
<PopUpSettings ScrollBars="None"></PopUpSettings> |
</EditFormSettings> |
<PagerTemplate> |
<table border="0" cellpadding="0" cellspacing="0" style="height: 20px" align="center"> |
<tr> |
<td width="100px"> |
<asp:LinkButton ID="LinkButton1" CommandName="Page" CausesValidation="false" CommandArgument="First" runat="server" style="text-decoration: none;"><img src="_assets/images/first.gif" alt="" style="vertical-align:middle; border: none; "/> <span class="pager">First</span></asp:LinkButton> |
</td> |
<td width="100px"> |
<asp:LinkButton ID="LinkButton5" CommandName="Page" CausesValidation="false" CommandArgument="Prev" runat="server" style="text-decoration: none;"><img src="_assets/images/arrow.gif" alt="" style="vertical-align:middle; border: none;" /> <span class="pager">Prev</span></asp:LinkButton> |
</td> |
<td align="center" width="100px"> |
<asp:LinkButton ID="LinkButton6" CommandName="RebindGrid" CausesValidation="false" runat="server" style="text-decoration: none;"><img src="_assets/images/refresh.gif" alt="" style="margin-right: 2px; vertical-align: middle; border: none;" /> <span class="pager">Refresh</span></asp:LinkButton> |
</td> |
<td align="right" width="100px"> |
<asp:LinkButton ID="LinkButton3" CommandName="Page" CausesValidation="false" CommandArgument="Next" runat="server" style="text-decoration: none;"><span class="pager">Next</span> <img src="_assets/images/arrowRight.gif" style="vertical-align:middle; border: none;" alt="" /></asp:LinkButton> |
</td> |
<td align="right" width="100px"> |
<asp:LinkButton ID="LinkButton2" CommandName="Page" CausesValidation="false" CommandArgument="Last" runat="server" style="text-decoration: none;"><span class="pager">Last</span> <img src="_assets/images/last.gif" style="vertical-align:middle; border: none;" alt="" /></asp:LinkButton> |
</td> |
</tr> |
<tr> |
<td colspan="5" align="center"> |
Page <%# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %> of <%# DataBinder.Eval(Container, "Paging.PageCount")%>, items from <%# (int)DataBinder.Eval(Container, "Paging.FirstIndexInPage") + 1 %> to <%# (int)DataBinder.Eval(Container, "Paging.LastIndexInPage") + 1 %> of <%# DataBinder.Eval(Container, "Paging.DataSourceCount")%>. |
</td> |
</tr> |
</table> |
</PagerTemplate> |
</MasterTableView> |
<PagerStyle Mode="Advanced" /> |
</telerik:RadGrid> |