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.2.dll

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