Telerik RadGrid for ASP.NET AJAX client-side data binding to ADO.NET DataServices

by Vladimir Enchev | Comments 5

We just extended RadGrid for ASP.NET AJAX with native client-side data binding to ADO.NET DataServices. Now you can use getDataServiceQuery() method and the grid will construct ADO.NET DataService style query:

var northwindService = new Sys.Data.DataService("NorthwindDataService.svc");
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
northwindService.query(tableView.getDataServiceQuery("Customers"), updateGrid);

All operations like paging, sorting and filtering are automatically persisted using $top, $skip, $orderby and $filter parameters!

Untitled

Untitled2

Download

,
Senior Technical Architect

5 Comments

Ben
Vlad; How successful have you guys been trying the same things with SL Client version of Astoria? Are you able to Create and Update records as well? I'm very anxious to hear your response as to what kind of success results you're getting with SL and Astoria. Thanks!
Valeri Hristov
We will provide a Silverlight sample application with ADO.NET Data Services (Astoria) by the end of the next week. Do you have some specific requirements about the sample? Which controls do you want to see in it? We are looking for some simple real-world scenario and I will be glad to hear your opinion.
Ben
Hi Valeri; Just a basic CRUD sample with some of your controls. i.e. Let's say, I want to create a database of videos by categories (Home appliances, food, education). So, we can use your wrap panel with filtering and your video control to show the list from database and play each video where the location and name is stored in database. And once important thing is that for the UPDATE part, every time a video is watched, the "Watch Count" in the database record gets incremented by one. Looking forward to you sample. Thanks Valeri!
Henrik Holte
Hi Valeri Have you tested you getDataServiceQuery with integers values in your dataset i have try to figure out why me sample not working and found out that the getDataServiceQuery not format the JSON correct for integers and I got this error """"Microsoft JScript runtime error: Sys.Data.DataServiceFailedException: The data operation 'Pos?&$filter=Id eq '66'&$top=10&$skip=0' returned invalid data. The JSON wrapper is incorrect.""""" if i move the '' surounding 66 then it working perfekt. Kind regards Henrik Holte
Vlad
Thanks Henrik! We fixed this immediately. You can contact the support to receive latest Telerik.Web.UI build.

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by Vladimir Enchev - or - read latest articles in Developer Tools