Skip to main content

TableView.IsDetailButtonVisibleBinding Property

Gets or sets the binding that determines which rows display detail expand buttons.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.1.dll

NuGet Package: DevExpress.Wpf.Grid.Core


public BindingBase IsDetailButtonVisibleBinding { get; set; }

Property Value

Type Default Description
BindingBase null

A BindingBase object specifying which rows display detail expand buttons.


The IsDetailButtonVisibleBinding property allows you to selectively hide detail expand buttons. The default DataContext for this binding is the master row. You can specify a converter that returns whether to display details buttons based on master row data.

You and your users can expand master rows even if expand buttons are hidden. To expand a master row, you can use the Ctrl++ shortcut or the ExpandMasterRow method. If you want to disable the Master-Detail functionality, use the TableView.AllowMasterDetail option instead.


This example uses the TableView.IsDetailButtonVisibleBinding property to conditionally hide detail expand buttons. The master row value is passed to the converter that returns true only for specified values.

WPF Data Grid - Specify Detail Buttons Visibility

View Example: Specify Detail Buttons Visibility

    <local:MyConverter x:Key="myConverter"/>
    <dxg:GridControl x:Name="grid" AutoGenerateColumns="AddNew">
            <dxg:DataControlDetailDescriptor ItemsSourcePath="Products">
                    <dxg:GridControl AutoGenerateColumns="AddNew">
                            <dxg:TableView AutoWidth="True" ShowGroupPanel="False"/>
            <dxg:TableView AutoWidth="True"
                           IsDetailButtonVisibleBinding="{Binding Row.Name, Converter={StaticResource myConverter}}"/>
[ValueConversion(typeof(object), typeof(bool))]
public class MyConverter : IValueConverter {
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
        // Obtain the value to be converted:
        string categoryValue = (string)value;

        // Specify values for which to show expand buttons:
        string[] categories = new string[] { "First", "Third" };
        if (categories.Contains(categoryValue))
            return true;

        // Disable expand buttons if the value is not in the list:
        return false;
    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
        return null;
See Also