GridViewToolbarCommand Enum
Lists the values that specify names of commands that can be performed by clicking toolbar items.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Members
Name | Description |
---|---|
Custom
|
A custom user command. |
Full
|
A command that expands all rows. |
Full
|
A command that collapses all rows. |
Clear
|
A command that clears sorting by the current column. |
Clear
|
A command that clears the filter applied to the current column. |
Show
|
A command that controls the filter control visibility. |
Show
|
A command that controls the filter row visibility. |
Show
|
A command that controls the filter row menu visibility. |
Clear
|
A command that clears the grouping in the grid’s group panel. |
Show
|
A command that controls the group panel visibility. |
Show
|
A command that controls the search panel visibility. |
Show
|
A command that controls the Column Chooser visibility. |
Show
|
A command that controls the footer visibility. |
Show
|
A command that controls the Customization Dialog visibility. |
Refresh
|
A command that refreshes grid data. |
New
|
A command that creates a new row. |
Edit
|
A command that allows editing the current row. |
Delete
|
A command that deletes the current row. |
Delete
|
A command that deletes the selected rows on the page. |
Update
|
A command that saves all the changes made to the current data row and switches the ASPx |
Cancel
|
A command that discards any changes made to the current row and switches the ASPx |
Preview
|
A command that displays the changed preview information when the control is in batch edit mode. |
Hide
|
A command that hides the preview when the control is in batch edit mode. |
Update
|
A command that recalculates total and group summaries on the client in batch edit mode. |
Expand
|
A command that expands the row. |
Collapse
|
A command that collapses the row. |
Expand
|
A command that expands the detail row. |
Collapse
|
A command that collapses the detail row. |
Export
|
A command that exports the grid’s data to a file in PDF format. |
Export
|
A command that exports the grid’s data to a file in DOCX format. |
Export
|
A command that exports the grid’s data to a file in RTF format. |
Export
|
A command that exports the grid’s data to a file in CSV format. |
Export
|
A command that exports the grid’s data to a file in XLS format. |
Export
|
A command that exports the grid’s data to a file in XLSX format. |
#Related API Members
The following properties accept/return GridViewToolbarCommand values:
#Remarks
To learn more about toolbars, see the Toolbars topic.
#Example
Web Forms:
Note
For a full example, see the ASPx
<dx:ASPxGridView ID="Grid" runat="server" DataSourceID="ProductsDataSource" EnableRowsCache="false" Width="100%">
<Columns>
...
</Columns>
<SettingsCustomizationDialog Enabled="true" />
<Toolbars>
<dx:GridViewToolbar Position="Top" ItemAlign="Right">
<Items>
<dx:GridViewToolbarItem Command="ShowCustomizationDialog" />
</Items>
</dx:GridViewToolbar>
</Toolbars>
</dx:ASPxGridView>
MVC:
@Html.DevExpress().GridView(
settings => {
settings.Name = "grid";
...
settings.Toolbars.Add(toolbar =>
{
toolbar.Enabled = true;
toolbar.Position = GridToolbarPosition.Top;
toolbar.ItemAlign = GridToolbarItemAlign.Right;
toolbar.Items.Add(GridViewToolbarCommand.New);
toolbar.Items.Add(GridViewToolbarCommand.Edit);
toolbar.Items.Add(GridViewToolbarCommand.Delete);
toolbar.Items.Add(GridViewToolbarCommand.DeleteSelectedRowsOnPage);
toolbar.Items.Add(GridViewToolbarCommand.Refresh, true);
});
...
}
).Bind(Model).GetHtml()