Grid / Binding to remote data
The Kendo UI grid supports data binding and you can command the widget to display data either from local or remote data storage. For remote data binding you need to specify a remote endpoint or web service returning data in JSON/JSONP, OData or XML format, and utilize the Kendo UI DataSource as a mediator between the grid and the underlying data. To make the connection to the remote endpoint and process the data properly, the data source needs information about the web service URL(s), the request type, the response data type, and the structure (schema) of the response, in case it is more complex than a plain array of objects.
In this example the grid fetches its data from a remote endpoint using a web service (Northwind.svc) assigned via the dataSource -> transport -> read attribute. It also defines the schema model of the response from the web service, as well as the type of the service (odata) via the dataSource type property. Note that in addition to the visualization, the grid provides built-in support for operations over data such as sorting, filtering and paging.
There are two possible ways to instantiate a Kendo UI grid:
- From an empty div element. In this case all the Grid settings are provided in the initialization script statement.
- From an existing HTML table element. Thus some of the Grid settings can be inferred from the table structure and elements HTML attributes.
In both cases the grid is registered as a standard jQuery plugin.
Additional information about how to utilize the data binding feature of the Kendo UI grid can be found in this section of the product documentation.
- Sample service
- Widget configuration