Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridDetailExpandButtonDisplayMode Enum

Lists values that specify when to display master-detail expand buttons in the Grid.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public enum GridDetailExpandButtonDisplayMode

#Members

Name Description
Auto

Expand buttons are displayed when the DetailRowTemplate is specified.

Never

Expand buttons are always hidden.

#Remarks

Use the DetailExpandButtonDisplayMode property to specify when to display master-detail expand buttons in the Grid. The default property value is Auto. The Grid shows expand buttons if the DetailRowTemplate is specified and the DetailRowDisplayMode is set to Auto. Otherwise, expand buttons are hidden.

The following example changes DetailExpandButtonDisplayMode to Never:

@inject NwindDataService NwindDataService

<DxGrid @ref="Grid" 
        Data="MasterGridData" 
        DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Never">
    <Columns>
        <DxGridDataColumn FieldName="ContactName" SortIndex="0" />
        <DxGridDataColumn FieldName="CompanyName" />
        <DxGridDataColumn FieldName="Country" />
        <DxGridDataColumn FieldName="City" />
    </Columns>
    <DetailRowTemplate>
        <Grid_MasterDetail_NestedGrid_DetailContent Customer="(Customer)context.DataItem" />
    </DetailRowTemplate>
</DxGrid>

@code {
    IGrid Grid { get; set; }
    object MasterGridData { get; set; }

    protected override async Task OnInitializedAsync() {
        MasterGridData = await NwindDataService.GetCustomersAsync();
    }
    protected override void OnAfterRender(bool firstRender) {
        if(firstRender) {
            Grid.ExpandDetailRow(0);
        }
    }
}

Grid - DetailExpandButtonDisplayMode Never

See Also