Posted 23 August 2019, 8:41 pm EST - Updated 3 October 2022, 7:32 pm EST
Disable Column Function
Posted by: oskarputraa on 23 August 2019, 8:41 pm EST
-
-
Posted 26 August 2019, 2:06 am EST
Hi Oskar,
You may need to handle the contextmenu event of the FlexSheet and hide the menu options from the DOM according to the right-clicked column:
fSheet.hostElement.addEventListener('contextmenu', e => { var hti = fSheet.hitTest(e); var ins = document.querySelector('div [wj-part="insert-columns"]') as HTMLDivElement; var del = document.querySelector('div [wj-part="delete-columns"]') as HTMLDivElement; var display = null; if(hti.col <= 1) { display = 'none'; } ins.style.display = del.style.display = display; }, true);
https://stackblitz.com/edit/angular-qmfcs4
Regards,
Ashwin