Version

Orientation

WebDataMenu™ can be oriented horizontally or vertically by setting the DataMenuGroupSettings object’s Orientation property to Vertical or Horizontal. By default, this property is set to Vertical.

The Orientation property can be set using the Microsoft® Visual Studio® Property Window (expand the GroupSettings property to set the Orientation property) or by using the following code :

In Visual Basic:

WebDataMenu1.GroupSettings.Orientation = Infragistics.Web.UI.NavigationControls.Orientation.Horizontal

In C#:

WebDataMenu1.GroupSettings.Orientation = Infragistics.Web.UI.NavigationControls.Orientation.Horizontal;

Horizontal Orientation :

WebDataMenu Orientation 02.png

Vertical Orientation :

WebDataMenu Orientation 01.png

You can also configure WebDataMenu to have a complex orientation, which means you can set the orientation of one item to be horizontal and another item to be vertical.

The following steps shows how to set a different orientation for different items in the WebDataMenu by setting the Orientation property on the item level. This overrides the Orientation property that is set on the control level.

  1. From the Visual Studio™ Toolbox, drag and drop a ScriptManager component and a WebDataMenu control onto the form.

  2. Add items to WebDataMenu as shown in the Getting Started with WebDataMenu topic .

  3. Select the Edit item in the WebDataMenu designer and expand the GroupSettings property. Set the Orientation property to Horizontal from the drop-down list. Your WebDataMenu designer now looks similar to the following image:

WebDataMenu Complex Oreintation 01.png
  1. Click Apply and OK to close the WebDataMenu Designer.

  2. Save and run your application. You will observe that orientation of root items and child items under the File item is vertical but the orientation of child items under the Edit item is horizontal similar to the following image:

WebDataMenu Complex Oreintation 04.png