IContextMenuItemCollection.AddCustomItem(Int32, String, Action) Method
Adds a custom menu item at the specified position in the item collection.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.dll
NuGet Package: DevExpress.Blazor
Declaration
IContextMenuItem AddCustomItem(
int index,
string text,
Action click
)
Parameters
| Name | Type | Description |
|---|---|---|
| index | Int32 | A position that marks where to insert the item. |
| text | String | Item caption. |
| click | Action | A handler for the item’s Click event. |
Returns
| Type | Description |
|---|---|
| IContextMenuItem | The inserted menu item. |
Remarks
Handle the CustomizeContextMenu event to modify context commands available in the Grid, Rich Text Editor, or TreeList component. In the event handler, call the AddCustomItem method to add a custom command to the main context menu or its sub-menus.
Refer to CustomizeContextMenu event descriptions for additional information and examples:
See Also