Number of collection in a KendoGrid

#1

if a KendoGrid relies on a collection - is it possible to force only a column of that KendoGrid to use another collection or source of data?
Something like :

“analyticResults”: {
“c3type”: “Facility”,
“c3function”: “getDistribution”,
“c3arguments”: {
“id”: “{{id}}”,
},
“responseTransform”: null,
“collection”: false
}

OR:

“data”: {
“itemsDataSource”: “facilitiesDataSource”,
“histogramDataSource”: “histogramDataSource”
},

0 Likes

#2

Check out the documentation on Loadable.childDataSources:
https://<environment_url>/assets/docs/output/index.html#!/api/C3.data.Loadable-cfg-childDataSources

(Record and Collection are both Loadable)

0 Likes

#3

Thanks - very useful - I have a “performance” related question - if more pages use the same collection where the childDatasource is declared then if one of those pages is not interested in the child data sources data , they are anyway retrieved. Any other option to set the new source of data at page level instead referring to the collection?

0 Likes

#4

The child data source definition is part of the parent data source definition. In fact, once the child data source is loaded, its data is merged with the parent data source data (using mappings specified in your configuration). For your use case, it sounds like you will have to create a new data source (without the child data source) if you do not want the child data source loaded on some pages.

0 Likes