Set "New" button below grid

From pmusers
Jump to: navigation, search

JavaScript can be used to move the "New" button from above a grid to below it, so it is easier for users to reach when working on the last row in a grid.

jQuery's .detach() function can be used to remove the button and then .append() is used to insert it below the grid.

Add the following JavaScript to the DynaForm:

var oNewButton = $("#myGrid").find("button.pmdynaform-grid-newitem").detach();

Where "myGrid" is the ID of the grid.