ASPxClientMenuItem.GetItem(index) Method

Returns the current menu item's immediate subitem specified by its index.

Declaration

GetItem(index: number): ASPxClientMenuItem

Parameters

Name Type Description
index number

An integer value specifying the zero-based index of the submenu item to be retrieved.

Returns

Type Description
ASPxClientMenuItem

An ASPxClientMenuItem object representing the menu item's immediate subitem located at the specified index within the menu item's MenuItem.Items collection.

Remarks

A menu control's client-side functionality enables you to programmatically access and manipulate a particular menu item's subitems on the client side. Use the GetItem method to get the client-side menu item object at the specified index in the list of the current menu item's immediate child items. The menu items of the immediate submenu level are maintained by the menu item's MenuItem.Items collection. This method can be used together with the ASPxClientMenuItem.GetItemCount method when iterating through the list of the immediate submenu items.

Note that the index parameter is zero-based and its upper available value is specified by the ASPxClientMenuItem.GetItemCount value decremented by one. If you pass an invalid index via the parameter, the method returns null.

In order to access menu items further down the menu tree, you can use the ASPxClientMenuItem.GetItem property of a subsequent menu item. The menu items of the root menu level can be accessed via the menu's ASPxClientMenuBase.GetItem method.

See Also