Hi,
I am using Nested Table. Below is the code I am using.
I want to format the row according to the rendered data’s type.
For example here the first level data type value is “Group” and children type value is “SubGroup”. So need to apply bold and background color to “Dark Grey” for “Group” data’s and bold and background color to “Red” for “SubGroup” data. How I can do this?
var sourceDataObject = [
{
code:“01”,
type:“Group”,
__children:[
{
code:“SubGorups01-01”,
type:“SubGroup”,
__children:[{
code:“Dep-01”,
type:“Department”
}]
},
{
code:“SubGorups01-02”,
type:“SubGroup”,
__children:[{
code:“Dep-02”,
type:“Department”
}]
}
]
},
{
code:“02”,
type:“Group”,
__children:[
{
code:“SubGorups02-01”,
type:“SubGroup”,
__children:[{
code:“Dep-03”,
type:“Department”
}]
},
{
code:“SubGorups02-02”,
type:“SubGroup”,
__children:[{
code:“Dep-04”,
type:“Department”
}]
}
]
}
];
hot = new Handsontable(container, {
data: sourceDataObject,
colHeaders: [‘code’, ‘type’],
nestedRows: true,
contextMenu: true,
rowHeaderWidth: 90,
licenseKey: “non-commercial-and-evaluation”,
rowHeaders:function(row){
return ‘⬞’;
}
});
hot.getPlugin("nestedRows").collapsingUI.collapseAll();