All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

GridViewSettings.DetailRowGetButtonVisibility Property

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

Namespace: DevExpress.Web.Mvc

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

Declaration

public ASPxGridViewDetailRowButtonEventHandler DetailRowGetButtonVisibility { get; set; }
Public Property DetailRowGetButtonVisibility As ASPxGridViewDetailRowButtonEventHandler

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.Init = (s, e) => {  
    MVCxGridView grid = (MVCxGridView)s;  
    grid.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