Radgrid not allowing multiple groups to be expanded

3 posts, 0 answers
  1. MBEN
    MBEN avatar
    210 posts
    Member since:
    Nov 2011

    Posted 29 Jan 2018 Link to this post

    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" />
                                        <telerik:GridGroupByField FieldAlias="" HeaderText=" " HeaderValueSeparator=""
                                            FieldName="carriername" ></telerik:GridGroupByField>
                                        <telerik:GridGroupByField FieldName="carriername"></telerik:GridGroupByField>
                                <telerik:GridBoundColumn  DataField="fullname" HeaderText="Participant" UniqueName="fullname"
                                     ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" FooterStyle-HorizontalAlign="Left">
                                <telerik:GridBoundColumn DataField="policynumber" UniqueName="PolicyNumber" HeaderText="Policy No"
                                     HeaderStyle-Width="8%" SortExpression="policynumber">
                                <telerik:GridDateTimeColumn DataField="issuedate" UniqueName="PolicyDate" HeaderText="Policy Date"
                                    SortExpression="issuedate" HeaderStyle-Width="8%" DataFormatString="{0:d}">
                                <telerik:GridBoundColumn Aggregate="Sum" DataField="JanEnd" HeaderText="January" DataFormatString="{0:c2}"
                                    HeaderStyle-Width="11%" >
                        <GroupingSettings RetainGroupFootersVisibility="true" GroupContinuesFormatString="" GroupContinuedFormatString="" GroupSplitDisplayFormat="showing {0} of {1} participants" />
  2. Attila Antal
    Attila Antal avatar
    511 posts

    Posted 30 Jan 2018 Link to this post

    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" ...>

    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.

    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.
  3. MBEN
    MBEN avatar
    210 posts
    Member since:
    Nov 2011

    Posted 31 Jan 2018 in reply to Attila Antal Link to this post

    Thanks, that worked.
Back to Top