This is a migrated thread and some comments may be shown as answers.

Problem with partial rendering

1 Answer 41 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
John asked on 26 Jun 2012, 03:05 PM

I have a RadGrid displaying data about orders (id, customer's name, firstname, etc) where each row is expandable. When a row is expanded, additional information contained in an ascx component is being shown. My problem is that the whole grid is actually fully reloaded each time a row is being expanded! (I noticed this behavior by displaying current datetime inside the component).

Am I missing some obvious settings?

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnablePartialRendering="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="griOrders">
                    <telerik:AjaxUpdatedControl ControlID="griOrders" LoadingPanelID="RadAjaxLoadingPanel1" />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" EnableViewState="true" />
    <telerik:RadGrid ID="griOrders" runat="server" AutoGenerateColumns="False" AllowSorting="True"
        AllowMultiRowSelection="False" AllowPaging="True" PageSize="20" GridLines="None"
        SortingSettings-SortedAscToolTip="Tri croissant" SortingSettings-SortedDescToolTip="Tri décroissant"
        OnSortCommand="griOrders_SortCommand" OnItemCommand="griOrders_ItemCommand"
        OnPageIndexChanged="griOrders_PageIndexChanged" OnNeedDataSource="griOrders_NeedDataSource">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView DataKeyNames="ID" AllowMultiColumnSorting="True" AllowNaturalSort="true"
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">
                        <uc:test runat ="server" />
                <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID" HeaderButtonType="TextButton"
                    DataField="ID" UniqueName="ID" DataType="System.String" ItemStyle-Width="70px"
                <telerik:GridBoundColumn SortExpression="Date" HeaderText="Date" HeaderButtonType="TextButton"
                    DataField="Date" UniqueName="Date" DataType="System.DateTime" ItemStyle-Width="80px"
                <telerik:GridBoundColumn SortExpression="Heure" HeaderText="Heure" HeaderButtonType="TextButton"
                    DataField="Heure" UniqueName="Heure" DataType="System.String" ItemStyle-Width="70px"
                <telerik:GridBoundColumn SortExpression="TTC" HeaderText="TTC" HeaderButtonType="TextButton"
                    DataField="TTC" UniqueName="TTC" DataType="System.Decimal" ItemStyle-HorizontalAlign="Right"
                    ItemStyle-Width="70px" FilterControlWidth="50px">
                <telerik:GridBoundColumn SortExpression="Nom Prénom" HeaderText="Nom Prénom" HeaderButtonType="TextButton"
                    DataField="Nom Prénom" UniqueName="NomPrénom" DataType="System.String" FilterControlWidth="150px">

Code Behind

protected void griOrders_ItemCommand(object source, GridCommandEventArgs e)
        if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem)
            ((GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible = !e.Item.Expanded;

Thanks for your help!

1 Answer, 1 is accepted

Sort by
Maria Ilieva
Telerik team
answered on 29 Jun 2012, 11:50 AM
Hi John,

Actually the described behaviour is expected in this case. In order to avoid this behaviour I would suggest you to set the HierarchyLoadMode for the RadGrid to "client" for more information on this matter see the help topic below:

Kind regards,
Maria Ilieva
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.
Asked by
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question