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

get_masterTableView() returning null in OnGridCreated event. Used to work before.

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stacy
Top achievements
Rank 1
Stacy asked on 12 Nov 2012, 08:30 PM
I have a client side function that fires when the "OnGridCreated" event is triggered.  The code in there used to work fine, then we got an update, now we discover get_masterTableView() is returning null in some cases were it used to be ok.  Any idea?


function onGridCreated(sender, eventArgs) {
        if (rowIsSelected()) {
        .....
 
function rowIsSelected()    {
        var getSeletecteRow=getSelectedRow();
        ......
 
function getSelectedRow()    {
        var employeeSummaryGrid = $find('<%=EmployeeSummaryGrid.ClientID%>');
        if (employeeSummaryGrid != null)
        {
            var MasterTable = employeeSummaryGrid.get_masterTableView();   //this is returning null in some cases
            return MasterTable.get_selectedItems()[0];
        }
 
        return null;
    }

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 15 Nov 2012, 09:22 AM
Hello Stacy,

Could you please try the following approach?
function gridCreated(sender, args) {
    var masterTable = sender.get_masterTableView();
    alert(masterTable.get_id());
}

It works as expected on my side and I am afraid we are not able to determine the reason for the problem just by the provided information so far.

Please open a support ticket to send us a sample runnable application demonstrating the problematic appearance or provide us the exact steps to reproduce the issue. Thus, we will be able to further analyze the issue and provide a proper solution.

All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Stacy
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or