Back to Devexpress

ASPxClientMenuBase.SetSelectedItem(item) Method

aspnet-js-aspxclientmenubase-dot-setselecteditem-x28-item-x29.md

latest1.7 KB
Original Source

ASPxClientMenuBase.SetSelectedItem(item) Method

Selects the specified menu item within a menu control on the client side.

Declaration

ts
SetSelectedItem(
    item: ASPxClientMenuItem
): void

Parameters

NameTypeDescription
itemASPxClientMenuItem

An ASPxClientMenuItem object specifying the menu item to select.

|

Remarks

If the ASPxMenuBase.AllowSelectItem property is set to true, end users are allowed to select menu items via mouse clicks. A menu control (either the ASPxMenu or ASPxPopupMenu) also provides the ability to select menu items on the client side via code. You can use the SetSelectedItem method for this purpose.

Note that only one item can be selected within a menu control at the same time, and this item is displayed selected only if the menu’s ASPxMenuBase.ItemLinkMode property is set to the ItemLinkMode.ContentBounds value.

To make none of the items selected within a menu control, pass null as the method’s parameter.

See Also

GetSelectedItem

AllowSelectItem

SelectedItem

Selected

EnableClientSideAPI

ASPxClientMenuBase Class

ASPxClientMenuBase Members