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

Clientside bind

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 15 Sep 2011, 03:12 PM
Hi,

I've been looking/following this demo:http://demos.telerik.com/aspnet-ajax/grid/examples/client/insertupdatedelete/defaultcs.aspx

At the moment I just have one column, the following is returned from my webservice. I'm using an alert to display the webservice result.
function updateGrid(result)
      
          var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
          tableView.set_dataSource(result);
          tableView.dataBind(); 
            
          var grid = $find("<%= RadGrid1.ClientID %>");
          grid.repaint();
      }
result returns this in the alert box
[{"Test_PK":1},{"Test_PK":58}]
when it databinds it clears the grid, but if I do var result = [{"Test_PK":1},{"Test_PK":58}];
it works fine?

Any idea what I'm missing?

Thanks

1 Answer, 1 is accepted

Sort by
0
Karl
Top achievements
Rank 1
answered on 19 Sep 2011, 11:32 AM
Hi,
Fixed this. Returned the data as an object from the webservice and it works.

Thanks
Tags
Grid
Asked by
Karl
Top achievements
Rank 1
Answers by
Karl
Top achievements
Rank 1
Share this question
or