Tab

ASPxCardViewCommandButtonEventArgs.ButtonType Property

Gets the type of the command button currently being initialized.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll

Declaration

public CardViewCommandButtonType ButtonType { get; }

Property Value

Type Description
CardViewCommandButtonType

One of the ColumnCommandButtonType enumeration values.

Available values:

Show 12 items
Name Description
Edit

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

New

Corresponds to the New command. Creates a new card.

Delete

Corresponds to the Delete command. Deletes the current card.

Select

Corresponds to the Select command. Selects/deselects cards.

Update

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

Cancel

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

UpdateSummaries

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.

SelectCheckbox

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

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.

EndlessPagingShowMoreCards

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

Recover

Corresponds to the Recover command. Recovers the deleted cards.

Example

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

View Example

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;
    }
}