Radgrid PageSize - System.OutOfMemoryException.

2 posts, 0 answers
  1. Raju
    Raju avatar
    8 posts
    Member since:
    Aug 2012

    Posted 30 Apr 2013 Link to this post

    Hi,
    I have used parent child hierarchical Telerik Grid with client side binding. My requirement is rad grid without paging and page size should be 365. But it is accepting only 110. If we give more than 110, it's throwing Exception as "Exception of type 'System.OutOfMemoryException'.

    Below is the code 


    <telerik:RadGrid ID="grdDepositReconciliation" runat="server" Skin="eMod" Width="700px"
        GridLines="None" AllowFilteringByColumn="false" AllowCustomPaging="false" PageSize="110"
        EnableEmbeddedSkins="false" AllowPaging="false" AllowSorting="false">
        <ClientSettings>
            <ClientEvents OnDataBinding="beforeLoad" OnDataBound="afterLoad" OnDataBindingFailed="LoadFailed" OnRowDataBound="grdDepositReconciliation_RowDataBound"
                OnCommand="grdDepositReconciliation_Command" OnHierarchyExpanding="grdDepositReconciliation_HierarchyExpanding"
                OnHierarchyCollapsing="grdDepositReconciliation_HierarchyCollapsing"/>
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed" CssClass="wd" Width="100%" HierarchyLoadMode="Client" ClientDataKeyNames="TransactionDate, AMCount, VMCount, CKCount,AMTotalCount,VMTotalCount,CKTotalCount">
            <Columns>
                <telerik:GridBoundColumn DataField="TransactionDate" HeaderText="Date" UniqueName="TransactionDate" HeaderStyle-Width="60"
                    ShowFilterIcon="false" AllowFiltering="false" DataType="System.DateTime"/>
                <telerik:GridTemplateColumn  DataField="pAMEX" HeaderText="Amex" HeaderStyle-HorizontalAlign="Center"
                    AllowFiltering="false" HeaderStyle-Width="60">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkpAMEX" runat="server"/>
                        <%--<input type="checkbox" id="chkpAMEX" runat="server"/>--%>
                        <asp:label id="lblpAMEX" runat="server"/>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn  DataField="pVISAMASTER" HeaderText="Visa/MC" HeaderStyle-HorizontalAlign="Center"
                    AllowFiltering="false" HeaderStyle-Width="60">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkpVISAMASTER" runat="server"/>
                        <%--<input type="checkbox" id="chkpVISAMASTER" />--%>
                        <asp:label id="lblpVISAMASTER" runat="server"/>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn  DataField="pCHECK" HeaderText="Checks" HeaderStyle-HorizontalAlign="Center"
                    AllowFiltering="false" HeaderStyle-Width="60">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkpCHECK" runat="server" />
                        <asp:label id="lblpCHECK" runat="server"/>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <%--<telerik:GridBoundColumn DataField="DepositReconciliationId" HeaderText="DepositReconciliationId" Visible="false" />--%>
                 
            </Columns>  
            <NestedViewTemplate>
                 <telerik:RadGrid ID="grdDepositReconciliationDetails" runat="server" GridLines="None"
                    Skin="eMod" EnableEmbeddedSkins="false" AllowSorting="false" PageSize="50" AutoGenerateColumns="false" Width="650px"
                    CellSpacing="0">
                    <ClientSettings>
                        <ClientEvents OnCommand="grdDepositReconciliationDetails_Command" OnRowDataBound="grdDepositReconciliationDetails_RowDataBound"
                             OnDataBinding="beforeLoad" OnDataBound="afterLoad" OnDataBindingFailed="LoadFailed" />
                    </ClientSettings>
                    <MasterTableView Width="650px" HierarchyLoadMode="Client" ShowHeader="false" ClientDataKeyNames= "AMTransactionID,VMTransactionID,CKTransactionID, AMDRID, VMDRID, CKDRID">                               
                        <Columns>
                            <telerik:GridBoundColumn DataField="PaymentDate" HeaderText="Date" HeaderStyle-Width="70"/>
                            <%--<telerik:GridBoundColumn DataField="AM" HeaderText="AMEX" />--%>
     
                            <telerik:GridTemplateColumn  DataField="cAMEX" HeaderText="AMEX" HeaderStyle-HorizontalAlign="Center"
                            AllowFiltering="false" HeaderStyle-Width="70">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkcAMEX" runat="server" />
                                    <asp:label id="lblcAMEX" runat="server"/>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  DataField="cVISAMASTER" HeaderText="Visa/MC" HeaderStyle-HorizontalAlign="Center"
                            AllowFiltering="false" HeaderStyle-Width="70">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkcVISAMASTER" runat="server" />
                                    <asp:label id="lblcVISAMASTER" runat="server"/>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  DataField="cCHECK" HeaderText="Checks" HeaderStyle-HorizontalAlign="Center"
                            AllowFiltering="false" HeaderStyle-Width="72">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkcCHECK" runat="server" />
                                    <asp:label id="lblcCHECK" runat="server"/>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </NestedViewTemplate>
            <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="false" />
        </MasterTableView>
        <ClientSettings AllowDragToGroup="true" Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true" />
    </telerik:RadGrid>

    Thanks in advance.
  2. Eyup
    Admin
    Eyup avatar
    4046 posts

    Posted 03 May 2013 Link to this post

    Hello Raju,

    The page size should not be an issue for RadGrid. I have prepared a sample RadGrid web site to test the described behavior. On my side setting a higher PageSize works as expected. Can you please check out the attached application and instruct me the exact steps to reproduce the issue?

    Regards,
    Eyup
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top