Back to Devexpress

ASPxVerticalGrid.CommandButtonInitialize Event

aspnet-devexpress-dot-web-dot-aspxverticalgrid-bc27c0df.md

latest4.4 KB
Original Source

ASPxVerticalGrid.CommandButtonInitialize Event

Enables individual command buttons to be initialized.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event ASPxVerticalGridCommandButtonEventHandler CommandButtonInitialize
vb
Public Event CommandButtonInitialize As ASPxVerticalGridCommandButtonEventHandler

Event Data

The CommandButtonInitialize event's data class is ASPxVerticalGridCommandButtonEventArgs. The following properties provide information specific to this event:

PropertyDescription
ButtonTypeGets the type of the command button currently being initialized.
EnabledGets or sets whether the processed command button is enabled. Inherited from ASPxGridCommandButtonEventArgs.
ImageGets the settings of an image displayed within the processed command button. Inherited from ASPxGridCommandButtonEventArgs.
RenderModeSpecifies the processed command button’s render mode. Inherited from ASPxGridCommandButtonEventArgs.
RowGets a command row which owns the processed command button.
StylesGets the processed command button’s style. Inherited from ASPxGridCommandButtonEventArgs.
TextGets the processed command button’s text. Inherited from ASPxGridCommandButtonEventArgs.
VisibleGets or sets whether the command button is visible. Inherited from ASPxGridCommandButtonEventArgs.
VisibleIndexGets the visible index of a data item (row, card or record) which contains the processed command button. Inherited from ASPxGridCommandButtonEventArgs.

Remarks

The CommandButtonInitialize event is raised for each built-in command button (edit, new, delete, etc.), and allows their settings to be initialized. For instance, you can hide or disable individual command buttons.

The processed button type is returned by the ASPxVerticalGridCommandButtonEventArgs.ButtonType property. The record in which this button is displayed can be identified by its visible index, returned by the ASPxGridCommandButtonEventArgs.VisibleIndex property. To specify whether the button should be visible or enabled, use the ASPxGridCommandButtonEventArgs.Visible and ASPxGridCommandButtonEventArgs.Enabled properties, respectively.

To initialize custom command buttons, handle the ASPxVerticalGrid.CustomButtonInitialize event.

See Also

CustomButtonInitialize

Vertical Grid

ASPxVerticalGrid Class

ASPxVerticalGrid Members

DevExpress.Web Namespace