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

Radgrid not allowing multiple groups to be expanded

2 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MBEN
Top achievements
Rank 2
Veteran
MBEN asked on 29 Jan 2018, 06:00 PM

I have grouping in my grid and want to be able to expand multiple groups but I am able to expand only one group at a time.

<telerik:RadGrid ID="rgQ1CashValues" runat="server" DataSourceID="dataSrcMonthlyCashValues" EnableViewState="false"
                    OnPreRender="grid_PreRender" OnItemCommand="grid_ItemCommand" OnItemDataBound="grid_ItemDataBound"
                    OnItemCreated="grid_ItemCreated" >
                    <MasterTableView TableLayout="Fixed" CommandItemDisplay="Top" DataSourceID="dataSrcMonthlyCashValues"
                        Name="Q1CashValuesSummary" EnableNoRecordsTemplate="true" DataKeyNames="carriername" ShowGroupFooter="true" GroupsDefaultExpanded="false">
                        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="true"
                            ExportToExcelText="" ExportToPdfText="" ShowExportToPdfButton="true" />
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldAlias="" HeaderText=" " HeaderValueSeparator=""
                                        FieldName="carriername" ></telerik:GridGroupByField>
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="carriername"></telerik:GridGroupByField>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridBoundColumn  DataField="fullname" HeaderText="Participant" UniqueName="fullname"
                                 ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" FooterStyle-HorizontalAlign="Left">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="policynumber" UniqueName="PolicyNumber" HeaderText="Policy No"
                                 HeaderStyle-Width="8%" SortExpression="policynumber">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="issuedate" UniqueName="PolicyDate" HeaderText="Policy Date"
                                SortExpression="issuedate" HeaderStyle-Width="8%" DataFormatString="{0:d}">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridBoundColumn Aggregate="Sum" DataField="JanEnd" HeaderText="January" DataFormatString="{0:c2}"
                                HeaderStyle-Width="11%" >
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <GroupingSettings RetainGroupFootersVisibility="true" GroupContinuesFormatString="" GroupContinuedFormatString="" GroupSplitDisplayFormat="showing {0} of {1} participants" />
                </telerik:RadGrid>

2 Answers, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 30 Jan 2018, 02:58 PM
Hi Mben,

Enabling the ViewState in Radgrid will allow you to expand more groups. Please give it a try and see if that works for you. (also attached a working sample)
<telerik:RadGrid EnableViewState="true" ...>
    ...
</telerik:RadGrid>

The purpose of ViewState is to store the controls' state, which can then be restored after a postback. For more information, you can check out the Maintaining State in a Control article. This is an important feature and should be left with the default (true) to get out the best of RadGrid. 

If, for some reason the size of ViewState is a concern, there is a help article describing the way of Optimizing ViewState usage.

I hope this will prove helpful.

Regards,
Attila Antal
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
MBEN
Top achievements
Rank 2
Veteran
answered on 31 Jan 2018, 11:17 PM
Thanks, that worked.
Tags
Grid
Asked by
MBEN
Top achievements
Rank 2
Veteran
Answers by
Attila Antal
Telerik team
MBEN
Top achievements
Rank 2
Veteran
Share this question
or