Skip to main content

GridViewSettings.CommandButtonInitialize Property

Enables individual row cells containing command column items to be initialized.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public ASPxGridViewCommandButtonEventHandler CommandButtonInitialize { get; set; }

Property Value

Type Description
ASPxGridViewCommandButtonEventHandler

A ASPxGridViewCommandButtonEventHandler delegate method allowing you to implement custom processing.

Remarks

settings.CommandButtonInitialize = (sender, e) => {  
    var grd = sender as MVCxGridView;  
    if (e.ButtonType == ColumnCommandButtonType.Delete) {  
        var val = grd.GetRowValues(e.VisibleIndex, ...);  
        e.Visible = !(bool)val;  
    }  
}; 
See Also