i am not able to add data to innergrid data source of hierarchy grid ,
im not able to access datasource of inner grid
Is der any method or way to access datasource of innerGrid
$("#indentGrid").kendoGrid({
dataSource: storeRestrictionsDS,
pageable: false,
editable: true,
selectable: true,
detailInit: detailInit,
autoBind: true,
columns: [
{field: "product",editor:nameEditor,title:'<g:message code="grid.pricing.fromDate.label" default="Product Name" />'},
{field: "numberOfDays",title:'<g:message code="grid.pricing.fromDate.label" default="Number Of Days" />'},
{command: { text: "ReIssue Product", className: "details-button" }, title: " ", width: "190px" }
]
});
function detailInit(e) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource : {
data:data
},
scrollable : false,
sortable : true,
cancel : true,
columns: [
{field: "name",title:'<g:message code="grid.pricing.fromDate.label" default="*Product Name" />'},
{field: "issueValue",title:'<g:message code="grid.pricing.fromDate.label" default="*Issue quantity" />'},
],
});
data=[];
}
});
productGridId another grid from where i get data
var productGridId=$("#productGrid").data("kendoGrid");
var productData = productGridId.dataSource.view()
var tmp = "", tmpId = "";
for ( var i = 0; i < productData.length; i++) {
if (productData[i].isChecked) {
tmp = tmp + "," + productData[i].name
tmpId = tmpId + "," + productData[i].issueValue
}
}
tmp = tmp.substring(1,tmp.length);
tmpId = tmpId.substring(1,tmpId.length);
var yo = tmp.split(",");
var yo1 = tmpId.split(",");
HERE I ADDED DATA TO DATA VARIABLE
for ( var i = 0; i < yo.length; i++) {
data.push({
name : yo[i],
issueValue:yo1[i]
});
}
indentGrid in my parent grid and i create inner grid by using <div/> it dosen't have any id ,to make it indivisual for each masrer row,
Here i dont want to get data from from read operation
i tried it by using a globle variable Data that i added value to thid data variable than i added thid data variable to my inner grid datasource but its not working
so please solve my problem
HOW TO add data to dataSource of inner grid of heirarchy grid .................
im not able to access datasource of inner grid
Is der any method or way to access datasource of innerGrid
$("#indentGrid").kendoGrid({
dataSource: storeRestrictionsDS,
pageable: false,
editable: true,
selectable: true,
detailInit: detailInit,
autoBind: true,
columns: [
{field: "product",editor:nameEditor,title:'<g:message code="grid.pricing.fromDate.label" default="Product Name" />'},
{field: "numberOfDays",title:'<g:message code="grid.pricing.fromDate.label" default="Number Of Days" />'},
{command: { text: "ReIssue Product", className: "details-button" }, title: " ", width: "190px" }
]
});
function detailInit(e) {
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource : {
data:data
},
scrollable : false,
sortable : true,
cancel : true,
columns: [
{field: "name",title:'<g:message code="grid.pricing.fromDate.label" default="*Product Name" />'},
{field: "issueValue",title:'<g:message code="grid.pricing.fromDate.label" default="*Issue quantity" />'},
],
});
data=[];
}
});
productGridId another grid from where i get data
var productGridId=$("#productGrid").data("kendoGrid");
var productData = productGridId.dataSource.view()
var tmp = "", tmpId = "";
for ( var i = 0; i < productData.length; i++) {
if (productData[i].isChecked) {
tmp = tmp + "," + productData[i].name
tmpId = tmpId + "," + productData[i].issueValue
}
}
tmp = tmp.substring(1,tmp.length);
tmpId = tmpId.substring(1,tmpId.length);
var yo = tmp.split(",");
var yo1 = tmpId.split(",");
HERE I ADDED DATA TO DATA VARIABLE
for ( var i = 0; i < yo.length; i++) {
data.push({
name : yo[i],
issueValue:yo1[i]
});
}
indentGrid in my parent grid and i create inner grid by using <div/> it dosen't have any id ,to make it indivisual for each masrer row,
Here i dont want to get data from from read operation
i tried it by using a globle variable Data that i added value to thid data variable than i added thid data variable to my inner grid datasource but its not working
so please solve my problem
HOW TO add data to dataSource of inner grid of heirarchy grid .................