How to change the datasource on a YUI datagrid after creation
- by Simon
I am using the Yahoo DataTable for which the API is here.
I am having difficulty changing the data once I have rendered the grid once. I am using jQuery to get data via AJAX, or from a client side data island and need to put this back into the grid.
There is no setDataSource method in the DataTable API, and changing 'dataSource.liveData' does not update the grid.
// does not work
dataTable.dataSource.liveData = [ {name:"cat"}, {name:"dog"}, {name:"mouse"};
The example I am basing my code on is the basic LocalDataSource example.
How can I update the data source without having to completely recreate the table. I do NOT want to use the YUI datasources that make Async calls. I need to know how I can do this 'manually'.