Telerik blogs

It has been a while since we introduced the initial version of the OData binding API for our controls. Despite providing robust OData binding, the old API had one major drawback – it was tedious to configure. A lot of markup was required and there was no design time in order to make developers life easier. Well, this is no longer! I am glad to announce that with Q2 2012 we are shipping our newly baked ODataDataSource control which is intended to replace the old API and provide more robust and straightforward way to consume OData services.

Visual OData Binding

 Its goal is simple – make OData binding easier than ever via providing design time configuration and codeless integration to all controls that support web-service binding. The first wave of controls to receive such binding is RadListBox, RadMenu, RadComboBox and RadTreeView. For the next service pack, we will include RadScheduler as well.

How to Use It

 In a series of blog post I will show you how to use the ODataSource in order to achieve different scenarios. Let’s start with RadTreeView and self-reference hierarchical binding. We will use the well-known Northwind database in order to display all employees. We will use design time only.

Let’s start with placing RadTreeView and RadODataDataSource on the page. The next step is to go to design time, click on the ODataDataSource smart tag and chose Show Wizard.

RadOdataSource smart tag


You are now present with a nice looking wizard prompting you to enter the service URL. I will use the Northwind service exposed by the Kendo UI team. As you enter the service URL, the wizard will display all possible end points. Check on Employees. Now the design time wizard shows all fields that the Employee model contains so that you can fine tune what you need. Let’s choose EmployeeID, FirstName, LastName and ReportsTo.

ODataSource wizard 

Click on Finish in order to close the wizard.

The next step is to open the tree view smart tag and select the configured ODataSource as a data source in the same manner that is used with all other ASP.NET data sources. As soon as you select it, the smart tag will be updated with combo boxes, which allow you to configure the data fields required for the binding.

RadTreeView smart tag 

What’s Next

 With the next service pack we will release similar design time support for RadScheduler. If you want to see similar support added for other controls, don’t hesitate to drop us a line. As always, any feedback is appreciated.


Webinar Week

About the Author

Genady Sergeev

is a Senior Manager in the Progress Web UI & Tools division, which develops the Kendo UI, UI for ASP.NET MVC and UI for ASP.NET AJAX products. He joined the company back in 2009 and since then he has been involved with the web UI products on a variety of levels, from a single contributor to a senior manager. Genady's main interests are in the field of client-side development and he is a big fan of the DevOps philosophy. In his free time he likes skiing and cross-country cycling.

Related Posts


Comments are disabled in preview mode.