Class ContextMenuBuilder<T>
Inheritance
Inherited Members
Namespace: Syncfusion.JavaScript
Assembly: Syncfusion.EJ.dll
Syntax
public class ContextMenuBuilder<T>
where T : class
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
ContextMenuBuilder(ContextSettings)
Initializes a new instance of the ContextMenuBuilder<T> class.
Declaration
public ContextMenuBuilder(ContextSettings items)
Parameters
| Type | Name | Description |
|---|---|---|
| ContextSettings | items | It accepts the list of contextmenu settings option |
Methods
ContextMenuItems(Action<ContextMenuItemsBuilder<T>>)
It sets a value that indicates whether to add the default context menu actions as a contextmenu items If enableContextMenu is true it will show all the items related to the target, if you want selected items from contextmenu you have to mention in the contextMenuItems
Declaration
public ContextMenuBuilder<T> ContextMenuItems(Action<ContextMenuItemsBuilder<T>> defaultItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<ContextMenuItemsBuilder<T>> | defaultItems | It accepts the list of ContextMenuItems through lambda expression |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
ContextMenuItems(List<ContextMenuItems>)
It sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, if you want selected items from contextmenu you have to mention in the contextMenuItems
Declaration
public ContextMenuBuilder<T> ContextMenuItems(List<ContextMenuItems> defaultItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<ContextMenuItems> | defaultItems | It accepts the list of ContextMenuItems |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
ContextMenuItems(List<String>)
It sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, if you want selected items from contextmenu you have to mention in the contextMenuItems
Declaration
public ContextMenuBuilder<T> ContextMenuItems(List<string> contextItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<System.String> | contextItems | It accepts the list of ContextMenuItems |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
CustomContextMenuItems(Action<CustomContextItemBuilder<T>>)
It sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid
Declaration
public ContextMenuBuilder<T> CustomContextMenuItems(Action<CustomContextItemBuilder<T>> customItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<CustomContextItemBuilder<T>> | customItems | It accepts the CustomContextMenuItems through lambda expression |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
CustomContextMenuItems(List<CustomContexMenuItems>)
It sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid
Declaration
[Obsolete]
public ContextMenuBuilder<T> CustomContextMenuItems(List<CustomContexMenuItems> customItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<CustomContexMenuItems> | customItems | It accepts the list of CustomContextMenuItems |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
CustomContextMenuItems(List<CustomContextMenuItems>)
It sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid
Declaration
public ContextMenuBuilder<T> CustomContextMenuItems(List<CustomContextMenuItems> customItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<CustomContextMenuItems> | customItems | It accepts the list of CustomContextMenuItems |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
DisableDefaultItems()
It sets a value that indicates whether to disable the default context menu items in the grid.
Declaration
public ContextMenuBuilder<T> DisableDefaultItems()
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
DisableDefaultItems(Boolean)
It sets a value that indicates whether to disable the default context menu items in the grid.
Declaration
public ContextMenuBuilder<T> DisableDefaultItems(bool disableDefaultItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disableDefaultItems | It accepts the boolean value and enables or disables the Contextmenu items |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
EnableContextMenu()
It sets a value that indicates whether to enable the context menu action in the grid.
Declaration
public ContextMenuBuilder<T> EnableContextMenu()
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
EnableContextMenu(Boolean)
It sets a value that indicates whether to enable the context menu action in the grid.
Declaration
public ContextMenuBuilder<T> EnableContextMenu(bool enablecontextmenu)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | enablecontextmenu | It accepts the boolean value and enables or disables the Contextmenu items |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
SubContextMenu(Action<SubContextMenuBuilder<T>>)
Used to set the subMenu to the corresponding custom context menu item.
Declaration
public ContextMenuBuilder<T> SubContextMenu(Action<SubContextMenuBuilder<T>> subContextMenu)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<SubContextMenuBuilder<T>> | subContextMenu | It accepts the list SubContextMenu Items through lambda expression |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |
SubContextMenu(List<SubContextMenu>)
Used to set the subMenu to the corresponding custom context menu item.
Declaration
public ContextMenuBuilder<T> SubContextMenu(List<SubContextMenu> subContextMenu)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<SubContextMenu> | subContextMenu | It accepts the list SubContextMenu Items |
Returns
| Type | Description |
|---|---|
| ContextMenuBuilder<T> | ContextMenuBuilder |