GridContextMenuBuilder
Methods
Body(System.Action)
Configures the context menu commands for the grid body (data rows).
Parameters
configurator - System.Action<GridContextMenuCommandFactory>
The lambda which configures the body context menu commands.
Groups(System.Action)
Configures the context menu commands for the grid groups (group rows).
Parameters
configurator - System.Action<GridContextMenuCommandFactory>
The lambda which configures the group context menu commands.
Head(System.Action)
Configures the context menu commands for the grid header.
Parameters
configurator - System.Action<GridContextMenuCommandFactory>
The lambda which configures the header context menu commands.
Events(System.Action)
Sets the event configuration of the grid context menu.
Parameters
configurator - System.Action<GridContextMenuEventBuilder>
The lambda which configures the events
Example
Razor
@(Html.Kendo().Grid<Product>()
.Name("grid")
.DataSource(dataSource =>
// configure the data source
dataSource
.Ajax()
.Read(read => read.Action("Products_Read", "Home"))
)
.CcontextMenu(menu => menu
.Events(events => events.Open("open"))
)
)
<script>
function open(e) {
// handle the dataBound event
}
</script>