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

Cannot find any bindable properties in an item from the datasource

1 Answer 423 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ozzie
Top achievements
Rank 1
Ozzie asked on 13 Feb 2009, 02:41 PM
Hello!

I receive the error Cannot find any bindable properties in an item from the datasource when I try to achieve client-side databinding with the help of a webservice.
I use one class to handle all calls to my stored procedures. They return a DataTable. When I use these calls in RadGrid1_NeedDataSource() to bind data with RadGrid1.DataSource = myClass.GetDataTable(); it works fine.
But when I place the same call in a WebService and use that Webservice in my javascript functions it does not.

in myService.cs:
[WebMethod]
public DataTable bindData()
{
   return myClass.GetDataTable();
}

my javascript:
function pageLoad(sender, args)
{
    setInterval("myService.bindData(updateGrid)", 1000);
}
function updateGrid(result)
{
     //var grid = $find("<%= RadGrid1.ClientID %>");
     //grid.DataSource = result;
     var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
     tableView.set_dataSource(result);
     tableView.dataBind();
}

In my RadGrid I use an ItemTemplate.


1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetoslav
Telerik team
answered on 16 Feb 2009, 04:02 PM
Hi Ozzie,

The JSON serializer doesn't support data table objects, so you can't get them through the web service. You have to use an alternative datasource object.

Hope this helps.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Ozzie
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or