Skip to main content

BootstrapClientMenu.GetItem(index) Method

Returns the menu’s root menu item specified by its index.

Declaration

GetItem(
    index: number
): BootstrapClientMenuItem

Parameters

Name Type Description
index number

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

Returns

Type Description
BootstrapClientMenuItem

A BootstrapClientMenuItem object representing the root item located at the specified index within the menu’s BootstrapMenu.Items collection.

Remarks

A menu control’s client-side functionality enables you to programmatically access and manipulate the root menu items on the client side. Use the GetItem method to get the client-side menu item object at the specified index in the root menu level. The menu items of the root menu level are maintained by the menu’s BootstrapMenu.Items collection. This method can be used together with the ASPxClientMenuBase.GetItemCount method when iterating through the list of the root menu items.

Note that the index parameter is zero-based and its upper available value is specified by the ASPxClientMenuBase.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 BootstrapClientMenuItem.GetItem property of a subsequent menu item.

See Also