Skip to content

Commit f7e40f5

Browse files
Apply suggestions from code review
Co-authored-by: Elena Khamliuk <80813840+khamlyuk@users.noreply.github.com> Co-authored-by: Anton Sameishchev <anton.sameishchev@devexpress.com>
1 parent 5fdd48a commit f7e40f5

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# Blazor Grid - Customize Context Menu
99

1010
This example enables, customizes, and implements context menus in Blazor Grid and Toolbar components. It demonstrates the following tasks:
11-
* Enable built-in context menus for DxGrid's predefined areas: header, footer, data row, group panel, group row, and group footer.
12-
* Customize context menu items for header, footer, and data rows using DxGrid APIs.
13-
* Define custom context menus for areas that do not include built-in context menus.
11+
* Enables built-in context menus for predefined Grid areas: header, footer, data row, group panel, group row, and group footer.
12+
* Customizes context menu items for header, footer, and data rows using Grid APIs.
13+
* Defines custom context menus for areas that do not include built-in context menus.
1414

1515
![Grid with Context Menu for a column](result.png)
1616

@@ -31,7 +31,7 @@ Set the [ContextMenus](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGr
3131

3232
The `DxGrid` component includes built-in APIs used to customize context menu items. This scenario affects the following Grid areas: header, footer, and data rows.
3333

34-
In the Grid's [CustomizeContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid.CustomizeContextMenu) event handler, call the helper method defined in the [GridContextMenuHelper.cs](./CS/GridWithContextMenu/Data/GridContextMenuHelper.cs#L298-L365) class to customize the built-in context menu items.
34+
In the [CustomizeContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid.CustomizeContextMenu) event handler, call the helper method defined in the [GridContextMenuHelper.cs](./CS/GridWithContextMenu/Data/GridContextMenuHelper.cs#L298-L365) class to customize built-in context menu items.
3535

3636
```
3737
<DxGrid @ref="Grid"
@@ -50,19 +50,19 @@ In the Grid's [CustomizeContextMenu](https://docs.devexpress.com/Blazor/DevExpre
5050

5151
### Add Custom Context Menus
5252

53-
Follow the steps below to display custom context menus for the toolbar component, Grid's edit row, and Grid's pager:
53+
To display custom context menus for the toolbar component, Grid's edit row and pager, you must:
5454

55-
1. In the [GridContextMenuContainer](./CS/GridWithContextMenu/Pages/GridContextMenuContainer.razor#L4-L28) component, define the context menu components.
56-
2. In the [GridContextMenuHelper](./CS/GridWithContextMenu/Data/GridContextMenuHelper.cs#L31-L59) class, implement context menu item generation, state management, and click handlers. The Blazor [Grid API](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid._methods) uses them to execute commands.
55+
1. In the [GridContextMenuContainer](./CS/GridWithContextMenu/Pages/GridContextMenuContainer.razor#L4-L28) component, define context menu components.
56+
2. In the [GridContextMenuHelper](./CS/GridWithContextMenu/Data/GridContextMenuHelper.cs#L31-L59) class, implement context menu item generation, state management, and click handlers. The Blazor [Grid API](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid._methods) calls these helper methods to execute commands.
5757
3. Add the [oncontextmenu:preventDefault](./CS/GridWithContextMenu/Pages/Index.razor#L14) directive to disable the standard browser context menu.
58-
4. In the Grid's [CustomizeElement](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid.CustomizeElement) event handler, subscribe to the **contextmenu** event to display the custom context menu.
58+
4. In the [CustomizeElement](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid.CustomizeElement) event handler, subscribe to the **contextmenu** event to display a custom context menu.
5959

6060
```
6161
<DxGrid @ref="Grid"
6262
...
6363
CustomizeElement="Grid_CustomizeElement"
6464
@oncontextmenu:preventDefault>
65-
<!-- ... -->
65+
@* ... *@
6666
</DxGrid>
6767
6868
<GridContextMenuContainer Grid="Grid" @ref="ContextMenuContainer" />
@@ -83,7 +83,7 @@ Follow the steps below to display custom context menus for the toolbar component
8383
}
8484
```
8585

86-
### Video
86+
#### Video
8787

8888
- [Adding a Context Menu to a Grid](https://www.youtube.com/watch?v=TfBR77ARnf8&t)
8989

0 commit comments

Comments
 (0)