Need a way to re-assign grid menu dropdown to any button
Hello, for my company I need a way to assign the main grid menu to a separate document element. I see that the uiGridMenu requires uiGrid to be present - so I'm guessing that means they're coupled?
I tried using the header template to customize the menu but the results were that the column headers became corrupted.
How much work would it be to make a grid menu with just a shared ui-grid scope instead of the hard require? Thanks
uiGridMenuItem does require uiGrid, but it looks like uiGridMenu itself does not. It's optional.
Depending on how you want to interact with the grid it may be possible to use a third-party menu widget and pass it a reference to the grid API.
c0bra, is there an example of how to attach functions to other elements using the grid API? Would this be possible with all of the menu item functions?
How much effort would it be to have an optional jquery selector to specify where the menu shows up? Thanks
If it were me I'd just build the new menu. There are really only a few things that attach to the grid menu:
- column hiding and showing. The underlying methods are available via the API, easy enough to recreate
- import and export, again the methods are available via API to attach to a custom widget It shouldn't be overly hard to put them into a new menu.
Alternatively, you could override the ui-grid-header.html template to put the menu somewhere else, or to style it.
No further comment for over a month, solution provided that probably resolves the issue. Closing, please re-raise if there is a reliable recreate or more information.