Posted 25 August 2023, 3:18 am EST - Updated 11 January 2024, 2:40 pm EST
I want to add some validate logic when to add new name or edit name how can i do that
Forums Home / Spread / SpreadJS
Posted by: thieunq92 on 25 August 2023, 3:18 am EST
Posted 25 August 2023, 3:18 am EST - Updated 11 January 2024, 2:40 pm EST
I want to add some validate logic when to add new name or edit name how can i do that
Posted 28 August 2023, 9:37 am EST
Hi,
You can add an event handler to the “OK” button of the “New Name” dialog box so that you can validate the entered custom name before adding it to the sheet or spread.
Please refer to the attached sample for more understanding.
In the above sample, the “nameManager” command’s execute() method is overridden. This method is used to show the name manager dialog box. When the name manager is shown, you could add the event listener to “New…” button of the name manager dialog box and then to the “OK” button of “New Name” dialog box.
Please let us know if you need further assistance.
References:
GC.Spread.Sheets.Designer.getCommand(): https://www.grapecity.com/spreadjs/api/designer/modules/GC.Spread.Sheets.Designer#getcommand
Regards