Blazor DataGrid Example - Command Column
Order ID | Customer ID | Freight | Order Date | Ship Country | Manage Records |
|---|
| 10001 | ALFKI | $2.30 | 5/15/1991 | Denmark | |
| 10002 | ANATR | $3.30 | 4/4/1990 | Brazil | |
| 10003 | ANTON | $4.30 | 11/30/1957 | Germany | |
| 10004 | BLONP | $5.30 | 10/22/1930 | Austria | |
| 10005 | BOLID | $6.30 | 2/18/1953 | Switzerland | |
| 10006 | ALFKI | $4.60 | 5/15/1991 | Denmark | |
| 10007 | ANATR | $6.60 | 4/4/1990 | Brazil | |
| 10008 | ANTON | $8.60 | 11/30/1957 | Germany | |
| 10009 | BLONP | $10.60 | 10/22/1930 | Austria | |
| 10010 | BOLID | $12.60 | 2/18/1953 | Switzerland | |
| 10011 | ALFKI | $6.90 | 5/15/1991 | Denmark | |
| 10012 | ANATR | $9.90 | 4/4/1990 | Brazil |
This sample demonstrates CRUD operations in the DataGrid using the command column feature.
The command column feature of the Blazor DataGrid allows you to render CRUD action buttons in a dedicated column. Use the GridColumn component's Commands property to define an array of command columns. The GridCommandColumn component's Type property defines predefined command buttons.
The built-in command buttons provided are:
- Edit - Enable editing mode for the selected record.
- Delete - Remove the selected record from the DataGrid.
- Update - Save all changes made to the record.
- Cancel - Discard all unsaved changes to the record.
For more detailed information about command column editing, refer to the command column editing documentation.