[SOLVED] Bug: sc_apl_conf("my_grid_app", "insert", "off") does nothing

I have a grid named “grid_user”. I rule.

In onApplicationInit event, I call sc_apl_conf(“grid_user”, “insert”, “off”);

All by itself. No tests, no comparisons.

According to the documentation, this should turn off the “Add New” button. It doesn’t appear to do anything. It also does nothing in the onScriptInit event, also documented as being a valid scope for the macro.

SC [SIZE=12px]8.1.015, Ubuntu 14.04.3, Chrome[/SIZE]

Can someone give me a workaround to programmatically turn the Add New button on/off on a grid app, of do I have to add a custom button?

Insert is for forms buttons, not grids, you have to use sc_btn_dispay, with “new” as param

You can add an insert button to a grid if you create an application link. The suggestion is that you can suppress this button due to some condition. Didn’t try, but appearantly that doesn’t work.

Thanks Giu. The documentation is unclear, but that does work. Thank you again.

🚀 Scriptcase 9.12 is now available! Check out the new features here 👉🚀 Next Monday (02/24), Scriptcase 9.12 will be released! Check out the new features before anyone else 👉