Thanks Helga for your continuos support.
I am not using the multi view cell. Please find the code below.
var grid = new webix.ui({
// template: "ji",
container: "dataGridView",
id: "myGrid",
view: "datatable",
borderless: true,
// autoConfig: true,
drag: "source",
select: "row",
// height: '50',
responsive: true,
scrollX: false,
fixedRowHeight: false,
rowLineHeight: 20,
rowHeight: 60,
multiselect: true,
dragColumn: "order",
resizeColumn: true,
headermenu: {
id: "headerMenu",
css:"webix-contextmenu",
width:150,
data: [{
id: "data",
value: "Flag",
}, {
id: "type",
value: "Type",
}, {
id: "name",
value: "Name",
}, {
id: "description",
value: "Description",
}, {
id: "updated_at",
value: "Date Added",
}, {
id: "reset",
value: "Reset To Defaults",
}],
on: {
"onItemClick": function(id, e) {
if (id === "reset") {
//loading the default state on click
var state = webix.storage.local.get("originalState");
if (state) {
if (grid !== undefined) {
console.log(grid);
var presentState = grid.getState();
grid.setState(state);
//console.log(List.Controller.getDefaultGridOrder());
if (List.Controller.getDefaultGridOrder() !== undefined) {
grid.data.order =
List.Controller.getDefaultGridOrder();
grid.refresh();
}
}
}
} else {
List.Controller.updateHeaderMenu(id);
}
}
}
},
//data: '',
on: {
// onBeforeLoad: function() {},
onAfterLoad: function() {
console.log("****************");
// Loading the saved state on launch & storing the default sort order
List.Controller.setDefaultGridOrder(grid.data.order);
var allFolderState = webix.storage.local.get("allFolderState");
if (allFolderState) {
grid.setState(allFolderState);
}
else {
var state = webix.storage.local.get("exitState");
console.log("****************");
console.log(state);
if (state) {
grid.setState(state);
}
}
}
},
columns: [{
id: "data",
header: "Flag",
css: "",
width: 50,
sort: "int",
// fillspace: true,
}, {
id: "type",
header: "Type",
sort: "string",
width: 80,
template: "<div class='#type#'></div>",
// addCellCss: "#type#",
}, {
id: "name",
sort: "string",
header: "Name",
width: 150,
// fillspace: true,
}, {
id: "description",
sort: "string",
header: "Description",
width: 400,
fillspace: true,
}, {
id: "updated_at",
sort: "string",
header: "Date Added",
width: 150,
}],
});