Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Context menus

Is there any way to apply multiple levels in a context menu?

Eg
Branch1
- Item 1
- Item 2
- Item 3
Branch 2
- Item 1
- Item 2
- Item 3

Comments

  • Only by being creative with your structure in the same manner as you've done with your post, eg manually indent the items.
    Perhaps have a separator line between each of the branches as well
  • Assuming you want to use the ShowContextMenu method, Mark is correct. This feature only supports simple context menus. The alternative is to implement your own context menu and call it using the OnItemClick event handler.
  • Thanks guys, I will have to deal with this via an alternative solution.

    The issue I have is that there are say 200 columns or so, and I use the right-click to hide/show columns. This means they all display in a great long list, with the little scroll arrows.
    As the columns are based on two levels eg (FolderName/ColumnName) by making a two level context menu I could just show FolderName first, then ColumnName second, making the context menu fit nicely.

    I will use a separate dialog to manage this.

    Colin
  • If you need a UI to allow users the ability to toggle up to 200 (or so) columns, then I would definitely recommend against using a context menu. A dialog with a control that supports checkboxes in a list - such as the SRP Tree, SRP ReporTable, or SRP EditTable -would be far better. Then you could add other features like a "Select All" and "Select None" button.
Sign In or Register to comment.