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

get_masterTableView() error!

1 Answer 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 31 Mar 2010, 08:06 PM

I have three radgrids on one aspx page.

If you click on a row in RadGrid1 it will update the results in Radgrid2, and if you click on a row in Radgrid2 it will update the results in Radgrid3. 

 

In RadGrid3 I have a GridTemplateColumn with an ImageButton that opens a new page using the RadWindowManager.  This works great and the window opens, but only for the first row in RadGrid3.  If I click on any other row I get the following JavaScript error.

 

Get_masterTableView(0.get_dataItems()[…] is null or not an object.

 

I have used the same code for other pages and it works flawlessly.  The only difference here is I am using multiple grids vs. one grid on the page. 

 

I think since RadGrid1 had only one row the RadWindowManager is pointing to it, I need the RadWindowManager to use the results from RadGrid3


Code for WindowManager and AjaxManager
 <telerik:RadWindowManager ID="RadWindowManager1" Style="z-index: 8000" Skin="Telerik" 
           VisibleOnPageLoad="false" runat="server">  
           <Windows> 
               <telerik:RadWindow Skin="Office2007" ID="Nomination" runat="server" Title="Modify Nomination" 
                   Height="300px" Width="450px" Left="150px" ReloadOnShow="true" Modal="true" /> 
           </Windows> 
       </telerik:RadWindowManager>       
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="ButtonSearch">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid2">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid3">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager>      
         <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0">  
            <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>' alt="Searching..." style="border: 0; margin-top: 100px;" /> 
        </telerik:RadAjaxLoadingPanel> 

1 Answer, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 31 Mar 2010, 08:22 PM

Disgregard!!! I found the answer "RadGrid3" please delete.... 

 

 

function ShowNominationForm(gasDay, nomId, id, rowIndex) {

 

 

var grid = $find("<%= RadGrid3.ClientID %>");

 

 

var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();

 

grid.get_masterTableView().selectItem(rowControl,

true);

 

window.radopen(

"../windows/nomination.aspx?id=" + id + "&gasDay=" + gasDay + "&nomId=" + nomId, "Nomination");

 

 

return false;

 

}

Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Share this question
or