Binding RadListView client Side-Collection of common programming errors
It won’t be available until the client-side AJAX framework has fully loaded.
To bind RadListView to a javascript array, use the set_dataSource() and dataBind() APIs in a point after the client-side AJAX framework (and RadListView) has loaded
What does your datasource result
look like? Is it an array? ASMX web service? WCF service?
Binding to Javascript Arrays To bind RadListView to a javascript array, use the set_dataSource() and dataBind() APIs in a point after the client-side AJAX framework (and RadListView) has loaded:
protected override void
OnPreLoad(EventArgs e) {
var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
MyData.BusinessDataStorage.GetData().ForEach(item =>
{
ScriptManager.RegisterArrayDeclaration(Page, "pageData", serializer.Serialize(item));
});
base.OnPreLoad(e); }
Binding to ASMX Web Services To bind RadListView to an ASMX Web Service, you need to set the following properties: .Location: service base location .DataPath: Data method name .CountPath: Count method name, if required .SortParameterType: Sort expression format, if supported .FilterParameterType: Filter expression format, if supported
If data and total row count is returned in one and the same service call, the CountPath setting is omitted. In this case, RadListView searches for fields with name Data and Count in the web service JSON response, respectively. To modify the names of the response fields RadListView looks for, set the DataPropertyName and CountPropertyName settings. Binding to WCF Services For automatic databinding to WCF services, RadListView is configured in an identical way as ASMX Web Services. In this example, RadListView is bound to a WCF Service that returns data and count in a single request:
Binding to OData Services Binding RadListView to OData service is quite straightforward. The only two required parameters are Location and HttpMethod=”Get”. OData services require GET requests in RadListView. Additionally, if a remote OData request is accessed (and it supports JSONP), ResponseType=”JSONP” is also added to ensure RadListView can make a remote service request:
http://www.telerik.com/help/aspnet-ajax/listview-clientside-various-datasources.html http://www.telerik.com/help/aspnet-ajax/listview-clientside-binding-specifics.html