get_masterTableView() is null

2 posts, 0 answers
  1. Keith
    Keith avatar
    3 posts
    Member since:
    Jun 2014

    Posted 09 Dec 2014 Link to this post

    I keep getting this error: "Cannot read property 'get_masterTableView' of null"  every time .
    I bind the Pivot grid in my C# code behind file and it displays the data just fine in the PivotGrid.

    Here is my ASP code:

    <script type="text/javascript">

       <telerik:RadPivotGrid ID="RadPivotGrid1" runat="server" 
            ResolvedRenderMode="Classic"  OnCellCreated = "RadPivotGrid1_CellCreated" 
            OnCellDataBound = "RadPivotGrid1_CellDataBound" ViewStateMode="Enabled"    >
            <PagerStyle ChangePageSizeButtonToolTip="Change Page Size" PageSizeControlType="RadComboBox">

                <telerik:PivotGridRowField DataField="ANNEX_ID" UniqueName="column2">
                <telerik:PivotGridRowField DataField="CLIN_ID" UniqueName="column1">
                <telerik:PivotGridColumnField DataField="FY_CODE" UniqueName="column">
                <telerik:PivotGridColumnField DataField="MOD" UniqueName="column4" 
                    DataField="FUNDING_AMOUNT" GrandTotalAggregateFormatString="" DataFormatString="{0:c}" 
                    UniqueName="column5" CalculationExpression="" ZoneIndex="3">

    <TotalFormat Level="0" Axis="Rows" TotalFunction="NoCalculation" SortOrder="Ascending"></TotalFormat>




        function GridCellSelected(sender, args) {

            var columnName = args.get_column().get_uniqueName();

            var rowheader = args.get_gridDataItem().getDataKeyValue("[---------CLINS----------]");

            var row = args.get_gridDataItem().get_cell(columnName);

            var row_data = row.innerHTML;

            var cellInfo = rowheader.substring(0, 6) + "," + columnName + "##Data=  " + row_data + "!";

            var new_amount = window.prompt("Change Dollar amount: ", row_data);

            var result = PageMethods.Change_Funding_FROM_RadGrid(cellInfo, new_amount, onSucess, onError);

            function onSucess(result) {
                //alert(result + "-Click Blue Refresh Button to view Changes" + prev_value + "to" + new_amount);

            function onError(result) {
                window.alert('ERROR [' + result);

            function rload() {
                var tbl = $find("<%= RadPivotGrid1.ClientID%>") ;
                var master = tbl.get_masterTableView();




  2. Konstantin Dikov
    Konstantin Dikov avatar
    2386 posts

    Posted 12 Dec 2014 Link to this post

    Hello Keith,

    The client object for RadPivotGrid does not have a method get_masterTableView(). This method is available for RadGrid only. 

    From the provided code snippet it not clear enough what is your exact scenario and what could cause this issue. Can you please provide the real markup of your page, because I have noticed that your RadPivotGrid definition is within a script tag, which is not valid and I assume that it was a mistake with copy/pasting the code.

    I would also like to suggest that you place the following in the same context as your current scripts and see if the client object will be found:
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function pageLoad() {
                var tbl = $find("<%= RadPivotGrid1.ClientID%>");
                alert tbl;

    Konstantin Dikov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top