ComponentOne Menu for ASP.NET AJAX: Menu for ASP.NET AJAX Top Tips

Menu for ASP.NET AJAX Top Tips

The following top tips for Menu for ASP.NET will help you when you use the C1Menu control.

Tip 1: Use the ClickToOpen property to open submenu by mouse click event instead of mouse over.

Tip 2: You can use C1Menu as a context menu by setting the ContextMenu property.

The context menu can appear when the associated element is right-clicked or hovered.

To make the context menu appear when you right-click its associated element:

Set the ContextMenu property to True and specify the ContextElementID property. The menu will be shown as a context menu when the associated element is right-clicked.

To make the context menu appear when you hover over its associated element:

Set the ContextMenu property to True and specify the HoverElementID property. The menu will be shown as a context menu when the mouse is over the associated element.

Tip 3: Use the NestedGroupCheckable property to enable checkable child menu items.

To enable checkable child menu items set the NestedGroupCheckable property to True.

To disable checkable child menu items set the NestedGroupCheckable property to False.

To set the NestedGroupCheckable property at design time:

1.   Open the C1Menu Tasks menu and select Edit Menu. The C1Menu Designer Form appears.

2.   Select the Group item in the treeview and locate its NestedGroupCheckable property in the property grid.

 

 

3.   Set the NestedGroupCheckable property to True.

Tip 4: Use WindowCollisionDetection property to allow the submenu to adjust its position to fit in the window bounds.

Tip 5: Use the DisplayVisible property to set the C1Menu or C1MenuItem invisible.

When the control’s Visible property is set to False, it will not render html code to the page. C1Menu supports the client side object model (CSOM), it depends on the dom elements, so we don’t suggest the user to set the Visible property to hide the C1Menu or its items, we strongly recommend the user to use the DisplayVisible property for showing/hiding the C1Menu or its items. If so, the entire DOM will be rendered and just set the "display:none" to those items with DisplayVisible = False.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.