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

jQuery $.Ajax RadGrid Client Side Binding

3 Answers 231 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
Jon (I.T. Agility Inc.) asked on 11 Aug 2009, 03:32 AM
Hello,

I'm trying to use jQuery to bind to RadGrid and I am getting get_masterTableView() is not a function whenever I try to bind the results of my ajax call.

I am using the following;

 function onSuccess(result) { 
                var grid = $('#<%= RadGrid1.ClientID %>'); 
                var tableView =  grid.get_masterTableView(); 
                tableView.set_dataSource(result); 
                tableView.dataBind(); 
                 
                $('#<%= RadAjaxLoadingPanel1.ClientID %>').hide("<%= RadGrid1.ClientID %>"); 
            } 

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 11 Aug 2009, 08:46 AM
Hello,

to find the client-side instance of RadGrid you need to use the $find method:

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

Your code would return the DIV element of the grid hence the error.

I hope this helps.

Greetings,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
answered on 11 Aug 2009, 06:45 PM
thanks - I was able to use the find method to locate the grid.  however - locating a loading panel always returns null.

$find('<%=RadAjaxLoadingPanel1.ClientID%>').show("<%= RadGrid1.ClientID %>");
0
Yavor
Telerik team
answered on 14 Aug 2009, 06:58 AM
Hello Jon,

Based on the supplied information, it is hard to determine why the loading panel is not properly located.
If the issue persists, you can open a formal support ticket, and send us a small application, demonstrating your logic, and the unwanted behavior.
We will review it locally, and get back to you with additional information.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or