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!