Hi, I currently try to tweak the dataSource Read function to load local data instead of using URL.
In my page I got several grid binding to several dataSource (I do not know at loading time because all page is dynamically created). All dataSource take data in one Read function that read an hugde local data array. I need to know witch DataSource (or Grid) call the Read function. But I can't found a way to do this.
Thanks for your help
In my page I got several grid binding to several dataSource (I do not know at loading time because all page is dynamically created). All dataSource take data in one Read function that read an hugde local data array. I need to know witch DataSource (or Grid) call the Read function. But I can't found a way to do this.
Thanks for your help
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);
}