I am using the RADGrid with a self-referencing hierarchy. The markup for this is (columns omitted):
The total record count in the database is 150. If I set the page size to 50, when I get to the third page the child records don't show (nor do the arrows indicating child records are present), however pages 1 and 2 worked fine. If I change the page size to 100 or higher the records with issues originally on page 3+ work flawlessly, but then I get the annoying "This script is taking a long time to run, do you wish to cancel?" error message from IE. It is only when the records get to the third page or more that their correlating child entries stop displaying.
The grid is being bound in the code-behind (Oracle is the provider) using the NeedDataSource event handler. Whenever that event is fired the grid's data source is set to a data table containing the entries (which is retrieved every time that event fires - all records returned according to the stored procedure).
Any thoughts on why pages 3+ would break, but 1 or 2 function fine no matter the page 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> |
The total record count in the database is 150. If I set the page size to 50, when I get to the third page the child records don't show (nor do the arrows indicating child records are present), however pages 1 and 2 worked fine. If I change the page size to 100 or higher the records with issues originally on page 3+ work flawlessly, but then I get the annoying "This script is taking a long time to run, do you wish to cancel?" error message from IE. It is only when the records get to the third page or more that their correlating child entries stop displaying.
The grid is being bound in the code-behind (Oracle is the provider) using the NeedDataSource event handler. Whenever that event is fired the grid's data source is set to a data table containing the entries (which is retrieved every time that event fires - all records returned according to the stored procedure).
Any thoughts on why pages 3+ would break, but 1 or 2 function fine no matter the page count?