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

Grid Expanding/Collapsing and going into edit mode very slow after upgrade

3 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Clark
Top achievements
Rank 2
Paul Clark asked on 09 Jun 2009, 10:51 AM
Hello

I have recently upgraded the telerik controls to Q1 2009 in my project and my hierachical grid has started acting very very slowly.

When you press the "+" to expand a row it now takes 20 seconds to do so and before it was instant. I have debugged it and after pressing the + it appears to just sit and just wait for 20 seconds. It will then run my "detailTableDataBind" function.

The grid is within a few other controls and uses AJAX, here is the code, I have removed the other two grids that are in the last 2 pageviews so not to confuse things:
  <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Width="100%" SelectedIndex="0">  
        <telerik:RadPageView ID="Pageview1" runat="server">  
            <div> 
                <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">  
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="radGridControls">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="radGridControls" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                        <telerik:AjaxSetting AjaxControlID="radGridPages">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="radGridPages" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                        <telerik:AjaxSetting AjaxControlID="radGridCustomPages">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="radGridCustomPages" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManager> 
                <telerik:RadGrid ID="radGridControls" runat="server" GridLines="None" OnDetailTableDataBind="radGridControls_DetailTableDataBind" 
                    AutoGenerateColumns="False" OnUpdateCommand="radGridControls_UpdateCommand" OnItemDataBound="radGridControls_ItemDataBound" 
                    OnItemCommand="radGridControls_ItemCommand" OnColumnCreated="radGridControls_ColumnCreated" 
                    EnableAJAX="True">  
                    <MasterTableView> 
                        <Columns> 
                            <telerik:GridBoundColumn Visible="False" DataField="ID" UniqueName="ID" /> 
                            <telerik:GridBoundColumn HeaderText="Name" DataField="Name" UniqueName="Name" /> 
                        </Columns> 
                        <DetailTables> 
                            <telerik:GridTableView runat="server" Name="ControlFields" EditMode="InPlace" Width="100%">  
                                <ExpandCollapseColumn Visible="False">  
                                    <HeaderStyle Width="19px" /> 
                                </ExpandCollapseColumn> 
                                <RowIndicatorColumn Visible="False">  
                                    <HeaderStyle Width="20px" /> 
                                </RowIndicatorColumn> 
                                <Columns> 
                                    <telerik:GridEditCommandColumn EditImageUrl="~/images/edit.gif" UpdateImageUrl="~/images/Save.gif" 
                                        CancelImageUrl="~/images/Delete.gif" ButtonType="ImageButton">  
                                    </telerik:GridEditCommandColumn> 
                                    <telerik:GridBoundColumn ReadOnly="True" DataField="LocalizationId" Visible="False" 
                                        UniqueName="column">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn ReadOnly="True" DataField="Key" UniqueName="Name" HeaderText="Name">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn ReadOnly="True" DataField="Type" UniqueName="Control" HeaderText="Control">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn ReadOnly="True" DataField="Value" UniqueName="DefaultValue" 
                                        HeaderText="Value">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridTemplateColumn UniqueName="TranslateValue" HeaderText="Selected Value">  
                                        <ItemStyle VerticalAlign="Top" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblValue" runat="server" Text=""></asp:Label> 
                                        </ItemTemplate> 
                                        <EditItemTemplate> 
                                            <asp:TextBox ID="txtValue" runat="server" Text="" Width="95%"></asp:TextBox> 
                                        </EditItemTemplate> 
                                    </telerik:GridTemplateColumn> 
                                </Columns> 
                            </telerik:GridTableView> 
                        </DetailTables> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="19px" /> 
                        </ExpandCollapseColumn> 
                        <RowIndicatorColumn Visible="False">  
                            <HeaderStyle Width="20px" /> 
                        </RowIndicatorColumn> 
                    </MasterTableView> 
                </telerik:RadGrid> 
            </div> 
        </telerik:RadPageView> 
        <telerik:RadPageView ID="Pageview2" runat="server">  
            <div> 
                
            </div> 
        </telerik:RadPageView> 
        <telerik:RadPageView runat="server" ID="PageView3">  
      
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 

Have you any ideas what's going on here?
Thanks

3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 12 Jun 2009, 10:42 AM
Hello Paul Clark,

Please check a few things. Try this scenario with and without ajaxifying your grid and see if there is any difference in loading times. Also, try setting RadGrid's detail table expanding on the client:

<MasterTableView HierarchyLoadMode="Client">

 and see if there is also any difference in loading times. Please share with us your observations.

Sincerely yours,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul Clark
Top achievements
Rank 2
answered on 12 Jun 2009, 03:52 PM
Wow that solved it! Back to being instant!

My Ajaxified grid going into edit mode also went quite slow, but not 20seconds. Is there a setting like that for that grid?

Thanks
0
Veli
Telerik team
answered on 16 Jun 2009, 07:46 AM
Hi Paul,

When HierarchyLoadMode is set to "Client" RadGrid creates all items from all nested table views. After that, expanding/collapsing parent items occur only on the client using javascript. Therefore, if you set this property for an ajaxified RadGrid, your grid will not perform an ajax callback at all. Instead, it will toggle items on the client only.

More information on this functionality you can find in this documentation article.

If you would like to get to know our general performance recommendations for RadGrid, please refer to the corresponding documentation here and in the following articles in the section.

Greetings,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Paul Clark
Top achievements
Rank 2
Answers by
Veli
Telerik team
Paul Clark
Top achievements
Rank 2
Share this question
or