Search code examples
kendo-uikendo-gridkendo-datasource

what is the difference between kendo.data.dataSource object and object for dataSource field of kendo widget


I've studied kendo UI framework. I found out that dataSource field for kendo widget could be object, array or kendo.data.dataSource object. is there any differences of process among these for making Kendo widget?


Solution

  • There is no difference on initializing a widget using Object, Array or DataSource in the dataSource option. The widget will create a dataSource internally anyway.

    From the docs:

    If the dataSource option is set to a JavaScript object or array the widget will initialize a new kendo.data.DataSource instance using that value as data source configuration.

    If the dataSource option is an existing kendo.data.DataSource instance the widget will use that instance and will not initialize a new one