Rank: Member Groups: Member
Joined: 12/9/2010 Posts: 28
|
I have a grid with a context menu to perform a number of specific functions -- save a row, change (hidden) flags in a row, add new rows, etc. This works like a charm.
The problem is that the users don't know to right-click to bring up the context menu, so all of the in-grid controls are overlooked.
Since many of the functions are row-specific, a ToolBar requires first selecting the row, then selecting the toolbar action -- a lot of mouse moves.
Adding row controls can work (Grid Demo Custom Column - Advanced 4), but there are a lot of actions that I'd like to have available, and that makes for a very wide cell (or a lot of obscure icons...). It doesn't scale well.
What I'd like to be able to do is to set up a custom column with a fixed control that can bring up the context menu. That is, something that is obviously clickable that can bring up the otherwise hidden context menu.
I'm not seeing a simple way to call function ShowContextMenu(e, grid, item, cell) or eo_ShowContextMenu(e, "<%=Menu1.ClientID%>"); directly since I'm not seeing a good way to obtain e (which appears to be used to position the menu near the point of the click).
Would it be preferable to place a Menu into a Custom Column (with the majority of the controls in a sub-menu)?
In short, for this application, I really like the idea of having a Menu that is context sensitive to the row (Item), but I'd like to make it a bit more obvious how to bring that menu up.
A way of obtaining 'e' would go a long way towards this.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
Hi, Here "e" is the DOM event object. You understanding about the purpose is correct: eo_ShowContextMenu use that object to get the mouse position so that it can display the context menu at the right location. The DOM event is directly passed to your event handler by the browser in a variable named "event". See here for more details: http://www.essentialobjects.com/doc/1/jsdoc.public.global.eo_showcontextmenu.aspxThanks!
|