Skip to main content

GridViewSettings.DetailRowGetButtonVisibility Property

Enables you to hide/show expand buttons displayed within individual data rows.

Namespace: DevExpress.Web.Mvc

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

Declaration

public ASPxGridViewDetailRowButtonEventHandler DetailRowGetButtonVisibility { get; set; }

Property Value

Type Description
ASPxGridViewDetailRowButtonEventHandler

A delegate method that allows you to implement custom processing.

Remarks

The grid fires the DetailRowGetButtonVisibility delegate property for each data row. It allows you to hide/show the expand buttons for an individual data row. For example, you can hide expand buttons for data rows whose details have no data.

settings.DetailRowGetButtonVisibility += (sender, args) =>    {  
    var detailRowHandlerGrid = (MVCxGridView)sender;  
    var value = detailRowHandlerGrid.GetRowValuesByKeyValue(args.KeyValue, "YourFieldName");  
    if (value == somevalue)  
        args.ButtonState = GridViewDetailRowButtonState.Hidden;  
};

Note

The grid does not raise the DetailRowGetButtonVisibility delegate property if the ASPxGridViewDetailSettings.ShowDetailButtons option is set to False.

See Also