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

RadGrid grouping items collapsed when I return

1 Answer 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 17 Nov 2010, 05:31 PM

Hi,

 I have a RadGrid (with Grouping and Filter buttons) displaying data. The grouping functionality is working and default value is set to expanded i.e. when I add a column to the group the individual groups are expanded). 
 The problem is though that when I navigate away and return the individual groups are collapsed. I have to open them up individually. Is there any way I can always get the items to be expanded? Would appreciate any comments/suggestions with in the code-behind file or in the front-end ASP.NET code

Thanks,
A.

*** ASP.NET Code as Follows:***

                <telerik:RadToolBar runat="server" ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick">
                    <Items>
                        <telerik:RadToolBarButton CommandName="ShowGrouping" CheckOnClick="true" SkinID="GroupIcon"
                            Text="Show Grouping" AllowSelfUnCheck="true" Group="1" Checked="False" />
                        <telerik:RadToolBarButton CommandName="ShowFiltering" CheckOnClick="true" SkinID="SearchIcon"
                            Text="Show Filters" AllowSelfUnCheck="true" Group="2" />
                    </Items>
                </telerik:RadToolBar>
                <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="TelerikGridOnNeedDatasource"
                    PageSize="50" DataSourceID="dsTypeActions" AllowPaging="True" PagerStyle-AlwaysVisible="true" AutoGenerateColumns="False" AllowSorting="True">
                    <MasterTableView DataSourceID="dsTypeActions" AllowCustomSorting="True" OverrideDataSourceControlSorting="true" GroupsDefaultExpanded="True">                
                        <Columns>
                            <telerik:GridBoundColumn DataField="Name" HeaderText="Name1" UniqueName="Name">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Address" HeaderText="Address1" UniqueName="Address">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </asp:View>

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 23 Nov 2010, 10:32 AM
Hi Alan,

By default the groups should be expanded even after navigation. The property that explicitly sets this state is GroupsDefaultExpanded and its default value is true. You can also set explicitly this value in the Page_Load event to ensure that it is set correctly when loading the page.
The code behind for the grid is ok, I presume there should be problems in the code-behind. You can find more information on the grouping functionality in this help article and as well this live demo
If the problem persists, please post a more complete code sample also from the code-behind so we can provide better assistance.

Regards,
Marin
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
Alan
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or