Problem in expand column

Resolved
Cleyton Barroso asked on August 27, 2018

Hello!
 
I created a context menu with the option to expand and collapse a particular column.
 

 flexmonster.customizeContextMenu(function(items, data, viewType) { 
if(!data.isTotalColumn && !data.isGrandTotalColumn){
items.push({
label: "Expand",
handler: function() {
flexmonster.expandData(data.hierarchy.dimensionName);
}
});

items.push({
label: "Collapse",
handler: function() {
flexmonster.collapseData(data.hierarchy.dimensionName);
}
});
}
return items;
});

But when I try to expand or collapse the DSC_DIVI3 column the component hangs and the page stops responding.
I am sending CSV file with data source, and a layout image.

1 answer

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster August 28, 2018

Hello, Cleyton,
Thank you for providing us with screenshot code example and data source sample. They were very helpful. The expandData API call expands all the nodes of the hierarchy. Since that operation is rather complex especially for a large number of nodes it takes some amount of time for the pivot to expand all the nodes. If you try with a smaller number of members the result will be different. Therefore, the only possible way here is expanding each node separately.
Please let us know in case of any other question.
Regards,
Dmytro
 

Please login or Register to Submit Answer