Skip to main content

ASPxCardViewCommandButtonEventArgs.ButtonType Property

Gets the type of the command button currently being initialized.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public CardViewCommandButtonType ButtonType { get; }

Property Value

Type Description

One of the ColumnCommandButtonType enumeration values.

Available values:

Show 12 items
Name Description

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


Corresponds to the New command. Creates a new card.


Corresponds to the Delete command. Deletes the current card.


Corresponds to the Select command. Selects/deselects cards.


Corresponds to the Update command. Saves all the changes made to the current card and switches the ASPxCardView to browse mode.


Corresponds to the Cancel command. Discards any changes made to the current card and switches the ASPxCardView to browse mode.


Corresponds to the Update summaries command. Recalculates total and group summaries when a user increases a cell value that was equal to the calculated minimum or decreases a value that was equal to the calculated maximum.


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


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


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


Corresponds to the Show more cards link. Loads cards on demand when endless paging is enabled.


Corresponds to the Recover command. Recovers the deleted cards.


The following example uses an external check box to change the visibility of ASPxCardView check boxes in multi-selection mode.

View Example

<dx:ASPxCheckBox ID="chkDisabled" runat="server" Text="Disable selection checkboxes"
    AutoPostBack="true" />

<dx:ASPxCardView ID="ASPxCardView1" runat="server" DataSourceID="AccessDataSource1" KeyFieldName="CustomerID" OnCommandButtonInitialize="ASPxCardView1_CommandButtonInitialize" AutoGenerateColumns="False">
        <dx:CardViewTextColumn FieldName="CompanyName" VisibleIndex="1">
        <dx:CardViewTextColumn FieldName="ContactName" VisibleIndex="2">
        <dx:CardViewTextColumn FieldName="City" VisibleIndex="5">
        <dx:CardViewTextColumn FieldName="Region" VisibleIndex="6">
        <dx:CardViewTextColumn FieldName="Country" VisibleIndex="8">
            <dx:CardViewCommandLayoutItem HorizontalAlign="Right" ShowSelectCheckbox="True">
            <dx:CardViewColumnLayoutItem ColumnName="Company Name">
            <dx:CardViewColumnLayoutItem ColumnName="Contact Name">
            <dx:CardViewColumnLayoutItem ColumnName="City">
            <dx:CardViewColumnLayoutItem ColumnName="Region">
            <dx:CardViewColumnLayoutItem ColumnName="Country">
            <dx:EditModeCommandLayoutItem HorizontalAlign="Right">
<br />
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/nwind.mdb"
    SelectCommand="SELECT * FROM [Customers]" />  
using System;
using DevExpress.Web;

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e) {

    protected void ASPxCardView1_CommandButtonInitialize(object sender, DevExpress.Web.ASPxCardViewCommandButtonEventArgs e) {
        if (e.ButtonType == CardViewCommandButtonType.SelectCheckbox)
            e.Visible = !chkDisabled.Checked;
See Also