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

"Click to Ungroup" in radGrid Grouping/Ungrouping is not working.

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kulveer
Top achievements
Rank 1
Kulveer asked on 09 Aug 2016, 11:34 AM

My RadGrid mark up is like this. 

 <telerik:RadAjaxPanel ID="gridPanel" runat="server" EnableViewState="true">
                <telerik:RadGrid runat="server" ShowGroupPanel="true" PagerStyle-AlwaysVisible="true" MasterTableView-TableLayout="Fixed"  ID="cmhgrid" Skin="Metro" Height="425px"
                    EnableViewState="true" AutoGenerateColumns="false" AllowPaging="true" OnNeedDataSource="cmhgrid_NeedDataSource">
                    <MasterTableView AllowPaging="true" GroupLoadMode="Server" PagerStyle-PageSizes="15" PagerStyle-Mode="NextPrevAndNumeric" TableLayout="Fixed" AllowFilteringByColumn="true"
                        AllowMultiColumnSorting="true" ClientDataKeyNames="SRVC_ORDER_UNIT, ORDER_NUMBER">
                        <Columns>
                            <telerik:GridBoundColumn DataField="SRVC_ORDER_UNIT" HeaderText="Service Order Unit" HeaderStyle-Width="150px" FilterControlWidth="114px"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ORDER_NUMBER" HeaderText="Order Number" HeaderStyle-Width="150px" FilterControlWidth="114px"></telerik:GridBoundColumn>
                            <telerik:GridNumericColumn DataField="MRR" HeaderText="MRR" DataFormatString="{0:c}" HeaderStyle-Width="150px" FilterControlWidth="114px"></telerik:GridNumericColumn>
                            <telerik:GridBoundColumn DataField="BUSINESS_ORG_NAME" HeaderText="Business Organisation Name" HeaderStyle-Width="300px" FilterControlWidth="264px"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="FORECAST" HeaderText="Forecast" HeaderStyle-Width="110px" FilterControlWidth="74px" ></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TARGET_MONTH" HeaderText="Target" HeaderStyle-Width="110px" FilterControlWidth="74px"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CCM_USR" HeaderText="CCM" HeaderStyle-Width="150px" FilterControlWidth="114px"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CCM_MGR" HeaderText="CCM_MGR" HeaderStyle-Width="150px" FilterControlWidth="114px"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CCM_DIR" HeaderText="CCM_DIR" HeaderStyle-Width="150px" FilterControlWidth="114px" ></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder"
                        AllowDragToGroup="true" AllowGroupExpandCollapse="false" AllowColumnHide="true" ReorderColumnsOnClient="false">
                        <Selecting AllowRowSelect="true" />
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
                        <Resizing EnableRealTimeResize="true" AllowColumnResize="false" ResizeGridOnColumnResize="true" />
                    </ClientSettings>
                    <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />
                </telerik:RadGrid>
            </telerik:RadAjaxPanel>

I'm able to group data, collapse/expand grouping data. But when I click on the "Click here to ungroup"  i.e) small 'x' icon on the grouped column I get a error like this in the below mentioned section.

0x800a138f - JavaScript runtime error: Unable to get property 'get_masterTableView' of undefined or null reference

function onclick(event)
{
$find('cmhgrid').get_masterTableView()._ungroupByExpression('0:0'); return false;__doPostBack('cmhgrid$GroupPanel$ctl04','') //Error occurs here
}

 

I'm unsure why this occurs. The radgrid is present in a simple aspx page without any other controls. And also similar functionality on other pages have been working fine.

Any help would be great. Thanks!

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 12 Aug 2016, 05:04 AM
Hi Kulveer,

I have examined your RadGrid configuration, but I do not see anything in particular that could cause such problem. Can you please ensure, by inspecting the browser's console, that there are no JavaScript errors that could break the initialization of the client-side object of the grid, present on the page?

You can also elaborate which version of the controls you are using and if there is some custom JavaScript logic on the page.

Looking forward to your reply.


Regards,
Konstantin Dikov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Kulveer
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or