Back to Devexpress

ASPxVerticalGrid.CustomButtonInitialize Event

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

latest4.8 KB
Original Source

ASPxVerticalGrid.CustomButtonInitialize Event

Enables you to initialize a custom command button.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event ASPxVerticalGridCustomButtonEventHandler CustomButtonInitialize
vb
Public Event CustomButtonInitialize As ASPxVerticalGridCustomButtonEventHandler

Event Data

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

PropertyDescription
ButtonIDGets the processed custom button’s identifier. Inherited from ASPxGridCustomCommandButtonEventArgs.
EnabledGets or sets a value that specifies whether the processed custom button is enabled. Inherited from ASPxGridCustomCommandButtonEventArgs.
ImageGets the settings of an image displayed within the processed custom button. Inherited from ASPxGridCustomCommandButtonEventArgs.
RenderModeSpecifies the processed custom command button’s render mode. Inherited from ASPxGridCustomCommandButtonEventArgs.
RowGets a command row which owns the processed custom command button.
StylesGets the processed custom button’s style. Inherited from ASPxGridCustomCommandButtonEventArgs.
TextGets or sets the processed custom button’s text. Inherited from ASPxGridCustomCommandButtonEventArgs.
VisibleGets or sets whether the processed custom button is visible. Inherited from ASPxGridCustomCommandButtonEventArgs.
VisibleIndexGets the visible index of a data item (row, card or record) which contains the processed custom button. Inherited from ASPxGridCustomCommandButtonEventArgs.

Remarks

The CustomButtonInitialize event is raised for each custom command button, and enables you to initialize it. For instance, you can handle this event to hide individual buttons.

The event parameter’s properties allow you to identify the button, record, the type of a cell which contains the processed button, etc.

To initialize individual built-in command buttons (edit, new, delete, etc.), handle the ASPxVerticalGrid.CommandButtonInitialize event.

Note

If you call the GetRecordValues method in the CustomButtonInitialize event handler, you should take into account the specific behavior described in the ASPxVerticalGrid.GetRecordValues topic.

Note

It is impossible to change the style of the selection checkbox using the CustomButtonInitialize event.

See Also

CustomButtons

CustomButtonClick

CustomButtonCallback

CommandButtonInitialize

Vertical Grid

ASPxVerticalGrid Class

ASPxVerticalGrid Members

DevExpress.Web Namespace