Skip to main content

ASPxClientMenuBase.GetSelectedItem Method

Returns the selected item within the menu control.

Declaration

GetSelectedItem(): ASPxClientMenuItem

Returns

Type Description
ASPxClientMenuItem

An ASPxClientMenuItem object that represents the selected menu item.

Remarks

If the ASPxMenuBase.AllowSelectItem property is set to true, end users are allowed to select menu items via mouse clicks. The selected menu item can be obtained on the client side by using the GetSelectedItem method.

If none of the items is selected within a menu control or selecting is prohibited, the GetSelectedItem method returns null.

In order to select a specific item on the client side, use the menu’s ASPxClientMenuBase.SetSelectedItem method.

See Also