I built an application that uses a groovy script to create a new row.
Is there a way to programmatically disable or remove the Add Row or Delete Row buttons on a form view?
In addition, how can I disable or remove the menu item (Data =>New Row and Data => Delete Row(s))?
I am afraid there is now simple and reliable way of disabling/enabling these actions. Both the menu items and toolbar buttons are handled by the same two actions. The actions are implemented in those two classes:
You could possibly try to use something along the lines below. The problem is that the actions themselvs are enabled/disabled by IJC depending on the current selection. Therefore simply calling setEnabled(false) won't work, the actions may be and will be enabled again by IJC.
SystemAction insertAction = SystemAction.get(com.im.ijc.core.api.actions.InsertRowAction.class);
SystemAction removeAction = SystemAction.get(com.im.ijc.core.api.actions.DeleteRowsAction.class);
I am sorry, I don't have a better answer at the moment. But we track this requirement on our backlog as "Customisable insert and delete row actions" item.
Ah, you might also need to...
I'm also interested in the disabling add/delete row buttons or preferably binding them to my groovy scripts.