Declined
Last Updated: 19 Jan 2015 15:53 by ADMIN
David
Created on: 08 Oct 2014 14:55
Category: Grid
Type: Bug Report
0
radgrid context menu ungroup command does not work
I am using the following grid:
   <telerik:RadGrid style="overflow: hidden" CssClass="dm-Grid" ID="gridView" runat="server" AllowPaging="false" PageSize="25" Skin="TylerSilver" EnableEmbeddedSkins="false" EnableViewState="true"
            ExportSettings-ExportOnlyData="true" ExportSettings-IgnorePaging="true" AutoGenerateColumns="false" SortingSettings-SortedBackColor="#F0F0F0" EnableAlternatingRowColor="true"
            EnableAjaxSkinRendering="true" AllowSorting="true" ShowGroupPanel="false" GroupPanel-Enabled="false"
            ClientIdMode="AutoId" AllowFilteringByColumn="true" onneeddatasource="gridView_NeedDataSource" Onitemcreated="gridView_ItemCreated" onitemdatabound="gridView_ItemDataBound">
            <clientsettings>
        <clientevents onrowselected="RowSelected" onrowdeselected="RowSelected" oncolumnclick="OnColumnClick" OnColumnSwapped="ColumnSwapped" OnGridCreated="OnGridCreated"/>
    </clientsettings>
        </telerik:RadGrid>

Columns are dynamic, created in code-behind to match configurable datasets, via gridView.Columns.Add.  Each column has UniqueName, SortExpression, and HeaderText properties set - first two to the field name, last to plain-English version of the field name with spaces, etc.  Data binding is via a data table created from search results:

 gridView.DataSource = allDocumentsTable;

and using the following JS to activate the header cell context menus:

 function ShowColumnHeaderMenu(ev, index) {
            var grid = $find("<%=gridView.ClientID %>");
            var columns = grid.get_masterTableView().get_columns();
            columns[index - 1].showHeaderMenu(ev, 5, 5);
        }

I'm able to group columns using the menu but the "ungroup" command in the menu does not work.  If I turn on the grouping panel as a test (we do not want this UI style in production code), I can ungroup columns using the panel, but that does not change the behavour of the ungroup command in the header menu; it still does not work.

I've tried this with the Q2 2014 release and the problem is reproducible in that version.
1 comment
ADMIN
Milena
Posted on: 19 Jan 2015 15:48
The example works correctly. However, when group by a column, then GridGroupSplitterColumn is added to the grid and the columns` indexes are changed. So, it is necessary to find the columns by UniqueName, but not by index.