Skip to main content
Tab

GridViewCommandColumnButton.ButtonType Property

Gets the button’s type.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public ColumnCommandButtonType ButtonType { get; }

Property Value

Type Description
ColumnCommandButtonType

One of the ColumnCommandButtonType enumeration values.

Available values:

Show 19 items
Name Description
Edit

Corresponds to the Edit command. Switches the ASPxGridView to edit mode.

New

Corresponds to the New command. Creates a new data row.

Delete

Corresponds to the Delete command. Deletes the current data row.

Select

Corresponds to the Select command. Selects/deselects data rows.

Update

Corresponds to the Update command. Saves all the changes made to the current data row and switches the ASPxGridView to browse mode.

Cancel

Corresponds to the Cancel command. Discards any changes made to the current data row and switches the ASPxGridView to browse mode.

ClearFilter

Corresponds to the Clear command. Clears the filter expression applied to the ASPxGridView.

SelectCheckbox

Corresponds to the Select command initiated via a select check box or radio button. Selects/deselects data rows.

ApplyFilter

Corresponds to the Apply command. Applies the filter specified in the filter row.

ApplySearchPanelFilter

Corresponds to the Apply command. Applies the filter specified in the search panel.

ClearSearchPanelFilter

Corresponds to the Clear command. Clears the filter specified in the search panel.

ShowAdaptiveDetail

Corresponds to the Show Adaptive Detail command. Expands the current adaptive detail row.

HideAdaptiveDetail

Corresponds to the Hide Adaptive Detail command. Collapses the current adaptive detail row.

Recover

Corresponds to the Recover command. Recovers the deleted rows.

CustomizationDialogApply

Corresponds to the Apply command. Apply changes made in the grid’s Customization Dialog.

CustomizationDialogClose

Corresponds to the Close command. Closes the Customization Dialog and discards all changes made in this dialog.

PreviewChanges

Corresponds to the Preview changes command. Switches the grid to Changes Preview mode to manage the modified rows.

HidePreview

Corresponds to the Hide preview command. Closes the Changes Preview mode and displays all grid rows including modified ones.

UpdateSummaries

Corresponds to the Update summaries command. Updates total and group summary values.

Remarks

The GridViewCommandColumnButton class is obsolete. Use the SettingsCommandButton property to access command buttons settings:

Online demo: ASPxGridView - Custom Command Buttons

Note

Add a command column and enable an appropriate Show[button_name]Button property to display command buttons in the grid.

In markup:

<dx:ASPxGridView ID="GridView1" runat="server" >
    <Columns>
        <dx:GridViewCommandColumn ShowNewButton="true" ShowEditButton="true" ButtonRenderMode="Image" />
        // ...
    </Columns>
    <SettingsCommandButton>
        <NewButton>
            <Image ToolTip="New" Url="Images/new.png" />
        </NewButton>
        <UpdateButton RenderMode="Image" />
    </SettingsCommandButton>
</dx:ASPxGridView>

In code:

GridViewCommandColumn commandColumn = new GridViewCommandColumn();
commandColumn.ShowNewButton = true;
commandColumn.ShowEditButton = true;
commandColumn.ButtonRenderMode = GridCommandButtonRenderMode.Image;
GridView1.Columns.Add(commandColumn);
GridView1.SettingsCommandButton.NewButton.Image.Url = "Images/new.png";
GridView1.SettingsCommandButton.NewButton.Image.ToolTip = "New";
GridView1.SettingsCommandButton.UpdateButton.RenderMode = GridCommandButtonRenderMode.Image;
See Also