or
function HomeCtrl($scope) { $scope.things = {dataSource: [{ name: "Thing 1", id: 1 },{ name: "Thing 2", id: 2 },{ name: "Thing 3", id: 3 }]}}<div kendo-treeview <br> k-data-source="things" k-data-text-field="'name'" /><div id="treeview"></div><script>$("#treeview").kendoTreeView({ dataTextField: [ "name"], dataSource: [{ name: "Thing 1", id: 1 },{ name: "Thing 2", id: 2 },{ name: "Thing 3", id: 3 }]});</script>function CreeDataSourceGroupes() { var that = this; //Pour cahque groupe présent $("[id*='Groupe'][data-role='grid']").each(function () { var groupeID = $(this).attr('Id') dsGroupes = new kendo.data.DataSource( { groupId: 'ID1', // ============= NEED TO READ THIS ID SET WHEN CREATING THE DS transport: { read: function (options) { that.DsGroupeRead(options); } } }); $(this).data('kendoGrid').setDataSource(dsGroupes); })}function DsGroupeRead (options, x){ // NEED THE GROUP ID HERE //var data = speakerData1 //options.success(data);}