Eliyahu Goldin
Top achievements
Rank 1
Eliyahu Goldin
asked on 07 Jun 2008, 08:27 PM
I get to my grid in the .aspx file as
function getGrid()
{
return window["<%= grMessageList.ClientID %>"];
}
mocsRadGrid = getGrid();
mocsRadMasterTableView = mocsRadGrid.MasterTableView ==
null ? mocsRadGrid.objectData.MasterTableView : mocsRadGrid.MasterTableView;
After upgrading to the RadControls for ASP.NET AJAX, this code doesn't work any more. I am getting an error that objectData is null. I tried get_MasterTableView() call but it is not recognized. The code runs on the first page load, not in an ajax postback.
What is the correct syntax now?
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 09 Jun 2008, 07:21 AM
0
Eliyahu Goldin
Top achievements
Rank 1
answered on 09 Jun 2008, 09:23 PM
No, this doesn't seem to be relevant to my problem.
I don't have any trouble with getting client reference to the grid. The problem is that the client object for the grid doesn't seem to include objectData anymore. The question remains: What is the replacement for objectData in the new grid?
I don't have any trouble with getting client reference to the grid. The problem is that the client object for the grid doesn't seem to include objectData anymore. The question remains: What is the replacement for objectData in the new grid?
0
Hello Eliyahu,
Please check this example to know more about how to get reference to the MasterTableView on the client:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Hierarchy/HierarchyLoadModeClient/DefaultCS.aspx
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please check this example to know more about how to get reference to the MasterTableView on the client:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Hierarchy/HierarchyLoadModeClient/DefaultCS.aspx
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Eliyahu Goldin
Top achievements
Rank 1
answered on 10 Jun 2008, 08:34 PM
I am confused by all these examples referring to scripts in RadCodeBlocks. My code runs not in Ajax calls, it is just in a regular <body onload> event. Even if it is in Ajax calls, I don't need to use the RadAjaxManager. In fact, calls to $find("<%= myGrid.ClientID %>") and $find("<%= myGrid.MasterTableView.ClientID %>") return null outside of Ajax calls. Old style window["<%= myGrid.ClientID %>"] and window["<%= myGrid.MasterTableView.ClientID %>"] do return client objects.
My next problem is that the new client model doesn't seem to include Rows array. My code myMasterTableView.Rows[index] causes an error. I tried myMasterTableView.get_dataItems[index] and got the same "null" exception.
My next problem is that the new client model doesn't seem to include Rows array. My code myMasterTableView.Rows[index] causes an error. I tried myMasterTableView.get_dataItems[index] and got the same "null" exception.
0
Hello Eliyahu Goldin,
Please, review the client-side API explained here to resolve the problem. You just need to change the square brackets to the round ones.
Greetings,
Konstantin Petkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please, review the client-side API explained here to resolve the problem. You just need to change the square brackets to the round ones.
Greetings,
Konstantin Petkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
