Apologize for the noobie question.
I am trying to populate both a grid and a chart with data from the same remote data source. However, since the chart will need it's data grouped, but the grid will not, it looks like I need to have two separate data sources, each one making a call to the database.
In an attempt to have only a single call to the database, I am trying to create a LOCAL data source by reading data from the REMOTE data source once it has been returned. I'm curious if this is even possible, and if so, how I would do this. This is what I'm currently trying. "remoteDataSource is working fine, but "localDataSource" doesn't seem to be bringing back any data.
var remoteDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "connect.php",
type: "get",
dataType: "json"
}
},
schema: {
model: {
fields: {
WONUM: { type: "string" },
RN: { type: "number" },
DESCRIPTION: { type: "string" },
STATUS: { type: "string" },
STATUSDATE: { type: "datetime" },
MONTH_DT: { type: "string" },
YEAR_DT: { type: "string" },
WORKTYPE: { type: "string" },
ASSETNUM: { type: "string" },
GMD_DEPT_CODE_ASSET: { type: "string" },
LOCATION: { type: "string" },
GMD_DEPT_CODE_LOC: { type: "string" }
}
}
},
});
var localDataSource = new kendo.data.DataSource({
data: remoteDataSource
});