i need insert columns but the function insertColumn() only have this parameters of asignation:
ind number index of the column
header string header content of column (optional, blank by default)
type string the type of the column (optional, ‘ed’ by default)
width number the width of the column (optional, ‘100’ by default)
sort string the sort type of the column (optional, ‘na’ by default)
align string the align of the column (optional, ‘left’ by default)
valign string vertical align of column (optional)
reserved any not used for now
columnColor string background color of the column (optional)
The id is important for the serialize or other source get data of grid. and some selects of this cell or column.
var createMultipleSubGrids = function (fatherGridJson, gridFatherObject) {
//CONTAINER OF SUBGRID
$.each(fatherGridJson.gridChild, function (index, item) {
$.each(item.head,function(i, itemHead) {
gridFatherObject.insertColumn(gridFatherObject.getColumnsNum(), itemHead.value, itemHead.type, itemHead.width, 'na', itemHead.align);
});
}
in this sample i have a grid created and 2 subgrids data in json will created in simple columns.