You can take help of this tutorial for Grid Menu Section
http://ui-grid.info/docs/#/tutorial/121_grid_menu in the new UI grid
Check this function:
$interval( function()
{
gridApi.core.addToGridMenu( gridApi.grid, [{ title: 'Dynamic item', order: 100}]);
gridApi.core.addToGridMenu( gridApi.grid, [{ title: 'New item', order: 600}]);
}, 0, 1);
.....
gridApi.core.addToGridMenu( gridApi.grid, [{ title: 'New item', order: 600}]);
}, 0, 1);
addToGridMenu(grid, items)
add items to the grid menu. Used by features to add their menu items if they are enabled, can also be used by end users to add menu items. This method has the advantage of allowing remove again, which can simplify management of which items are included in the menu when. (Noting that in most cases the shown and active functions provide a better way to handle visibility of menu items)
Parameters
Param Type Details
grid
Grid
the grid on which we are acting
items
array
menu items in the format as described in the tutorial, with the added note that if you want to use remove you must also specify an id field, which is provided when you want to remove an item. The id should be unique.