How to split a Kendo Grid into a child and parent grid? -
so i'm having problems grid because has many columns. i'd split grid half, having half of columns shown in main grid , other half in child grid when row gets expanded.
basically data in row of parent grid has same data in row of child grid, different columns shown.
the code below should transformed this:
here's grid itself:
$("#materials") .kendogrid({ datasource: { data: [], schema: { model: { id: "id", fields: { id: { type: "number", editable: false }, code: { type: "string", editable: false }, name: { type: "string", editable: false }, externalcode1: { type: "string", editable: false }, externalcode2: { type: "string", editable: false }, othercode1: { type: "string", editable: false }, servicemode: { type: "string", editable: false }, } } }, pagesize: 20 }, pageable: true, columns: [ { field: "code", title:"code"}, { field: "name", title: "name"}, { field: "externalcode1", title:"external code1"}, { field: "externalcode2", title:"external code2"}, { field: "othercode1", title:"other code1"}, { field: "servicemode", title:"service mode"}, ], editable: false });
i'm filling data on document ready faster pageload performance ajax call.
you can use data passed in detailinit
event used in child grid.
try jsfiddle if works you.
Comments
Post a Comment