Skip to main content
All docs
V26.1
  • GridDetailExpandButtonDisplayMode Enum

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

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.Grid.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    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>
            <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