Wednesday, October 12, 2016

AX2012 EP Toolbar

Requirement: To add a toolbar for add and delete line on a grid.

Step 1: Create a toolbar with the desired actions. This step would internally have two steps in first we will create a WebMenu object
The next step would be to create a WebActionMenuItem for each action that you want to appear in the menu created above. Each WebActionMenuItem being created should be associated with a Class, and this class should have a main method which would be invoked when the menu item is clicked in the portal.

Once the WebActionMenuItems are created these are dragged and drop inside the WebMenu. In our example two WebActionMenuItems are created namely AFZEPInvenTransDelete and EPInventTransAdd with labels of Add line and Remove line respectively



We are now ready to render the toolbar on the user control. To add a toolbar, the toolbar control should dragged and dropped onto the grid control. Once the toolbar control has been created it has to be associated with the Menu created in the step above, this is done using the property sheet of the toolbar.





No comments: