How robust is the support for context menus on a treegrid? E


How robust is the support for context menus on a treegrid? Essentially,
I’m using a 1 column grid with a tree column and I want different context menus
to show up depending on which tree level is being clicked on. I couldn’t
readily find information on how to do so. I tried using the
setOnBeforeContextMenu(func), but that seems to disable the menu (menu doesn’t
show up). Where can I add conditions that will help me decide which menu should
be displayed and whether a menu should be


displayed or not.

Also, if I set a column type to tree, can I also
make that column read-only?


>
I tried using the setOnBeforeContextMenu(func),


This
is correct solution, this event occurs before menu showing and retrieves
element ID (combination of row and cell) - any operation against menu can be
executed here.


You
need to return true, from such event handler, in other case (if false or
nothing returned) context menu will not be shown at all.


>
Also, if I set a column type to tree, can I also make that column


>
read-only?


Next
command controls this behaviour:

                mygrid.enableTreeCellEdit(false);