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

[Solved] Using Azure Mobile Services with RadGrid

3 Answers 110 Views
Grid for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stuart
Top achievements
Rank 1
Stuart asked on 21 Oct 2013, 10:36 PM
Hi,

I'm fairly new to Windows app development and the Telerik Controls. I'm currently looking to develop an app that uses an Azure database.

Does anybody have any advice or examples for connecting to and reading an Azure table and putting the data in to a RadGrid using HTML and Javascript? I have managed to find one or two C# examples but it's not a programming language I'm familiar with.

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Martin Yankov
Telerik team
answered on 23 Oct 2013, 10:34 AM
Hello Stuart,

 
Thank you for your interest in RadControls for Windows 8 HTML.

There are two ways you can connect to a Windows Azure Mobile Services data. You can connect via the Mobile Services for WinJS library or via the Mobile Services Web API service.

The first method is described in this tutorial: Get Started with Data in Mobile Services. The first part of the tutorial depicts how you can create a mobile service and add tables. In the second part there are code samples and explanations regarding how you can connect your application to the service. 

You can then read, update or insert into the table. Below is a modification of the code sample in step 9. that reads the table object, assigns the resulting array to RadGrid's dataSource and refreshes the control. This sample assumes RadGrid has already been instantiated.

function refreshGrid() {
    azureTable.read().done(function (results) {
        radGrid.dataSource.data = results;
        radGrid.refresh();
    });
};

Note that with this approach, operations like sort and filter will happen inside the DataSource and not in the Azure data storage. Edits will also take place locally without updating the data in the cloud, unless you explicitly write code that updates the azureTable object.

The second method uses the Mobile Services Web API. Take a look at this article: Mobile Services Web API Query Records. It holds information regarding the request uri, the request parameters and the request headers you need to set. You can specify the request parameters in RadGrid's dataSource. Here is a link to a documentation article that explains how you can bind the dataSource to a remote web service: DataSource Remote Binding
If you need editing, take a look at the respective articles in the Azure tutorial (siblings to the Mobilie Services Web API Query Records) and this article in the RadControls documentation.

I hope this information is useful. In case you have further questions about setting up RadGrid/DataSource in this scenario, do not hesitate to ask me.

Regards,
Martin Yankov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tishawn
Top achievements
Rank 1
answered on 12 May 2014, 06:13 PM
This is exactly what i'm trying to do but with C# - getting data from azure mobile services and then filtering the data with ragrid. Any help with this would be appreciated.

Thank you for reading.
0
Rosy Topchiyska
Telerik team
answered on 15 May 2014, 10:04 AM
Hello Tishawn,

I have answered your question in another forum thread:
http://www.telerik.com/forums/filtering-with-azure

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid for HTML
Asked by
Stuart
Top achievements
Rank 1
Answers by
Martin Yankov
Telerik team
Tishawn
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Share this question
or