I have created a page with three read only grids on it. I would like to be able to populate the grids from a single datasource to reduce the number of server requests. The schemas for the grid are not the same.
I have tried creating the a single datasource and the allocating the data to the appropriate grid during the 'change' function of the datasource.
My preferred solution would be to to do it at the data schema level ...
Then divide up the data in the change event of the
This doesn't work !
So I tried to move the data into a single data schema ...
And extracted the data to set the grid data sources ...
Which didn't work ... I have also look at using filters to achieve the desired result be have not been able to get that to work.
What would be the best way to populate several grids from a single datasource ?
Thank you for you help.
I have tried creating the a single datasource and the allocating the data to the appropriate grid during the 'change' function of the datasource.
My preferred solution would be to to do it at the data schema level ...
{
datasetA : [], datasetB: [], success: true}Then divide up the data in the change event of the
datasource.change: function(){ oDataA = new kendo.data.DataSource(this, {schema: {data: "datasetA"}}); $("#gridA").data("kendoGrid").setDataSource(oDataA); oDataB = new kendo.data.DataSource(this, {schema: {data: "datasetB"}}) $("#gridA").data("kendoGrid").setDataSource(oDataB);}This doesn't work !
So I tried to move the data into a single data schema ...
{ data : [{ datasetA : [], datasetB: [] }] success: true}And extracted the data to set the grid data sources ...
datasource.change : function(){ $("#gridA").data("kendoGrid").setDataSource(this.at(0).datasetA); $("#gridB").data("kendoGrid").setDataSource(this.at(0).datasetB);}Which didn't work ... I have also look at using filters to achieve the desired result be have not been able to get that to work.
What would be the best way to populate several grids from a single datasource ?
Thank you for you help.