Skip to main content
A newer version of this page is available. .
Tab

GridViewToolbarCommand Enum

Lists the values that specify names of commands that can be performed by clicking toolbar items.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public enum GridViewToolbarCommand

Members

Name Description
Custom

A custom user command.

FullExpand

A command that expands all rows.

FullCollapse

A command that collapses all rows.

ClearSorting

A command that clears sorting by the current column.

ClearFilter

A command that clears the filter applied to the current column.

ShowFilterEditor

A command that controls the filter control visibility.

ShowFilterRow

A command that controls the filter row visibility.

ShowFilterRowMenu

A command that controls the filter row menu visibility.

ClearGrouping

A command that clears the grouping in the grid’s group panel.

ShowGroupPanel

A command that controls the group panel visibility.

ShowSearchPanel

A command that controls the search panel visibility.

ShowCustomizationWindow

A command that controls the Column Chooser visibility.

ShowFooter

A command that controls the footer visibility.

ShowCustomizationDialog

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.

DeleteSelectedRowsOnPage

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 ASPxGridView to browse mode.

Cancel

A command that discards any changes made to the current row and switches the ASPxGridView to browse mode.

PreviewChanges

A command that displays the changed preview information when the control is in batch edit mode.

HidePreview

A command that hides the preview when the control is in batch edit mode.

UpdateSummaries

A command that recalculates total and group summaries on the client in batch edit mode.

ExpandRow

A command that expands the row.

CollapseRow

A command that collapses the row.

ExpandDetailRow

A command that expands the detail row.

CollapseDetailRow

A command that collapses the detail row.

ExportToPdf

A command that exports the grid’s data to a file in PDF format.

ExportToDocx

A command that exports the grid’s data to a file in DOCX format.

ExportToRtf

A command that exports the grid’s data to a file in RTF format.

ExportToCsv

A command that exports the grid’s data to a file in CSV format.

ExportToXls

A command that exports the grid’s data to a file in XLS format.

ExportToXlsx

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

The values listed by this enumeration are used to set the GridViewToolbarItem.Command property value.

Concept

Example

WebForms:

Note

For a full example, see the ASPxGridView - Customization Dialog demo.

<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()
See Also