Skip to content

GridDetailView closes immediately after opening #920

@johannesschliesser

Description

@johannesschliesser

Describe the bug
GridDetailView closes immediately after opening

To Reproduce
Steps to reproduce the behavior:

  1. Klick arrow to open GridDetailView

Expected behavior
The GridDetailView should stay open. Actually the same error occurs at the bootrap website: https://demos.blazorbootstrap.com/grid/detail-view . My code worked fine for months now. This started showing up todat 29.10.2025

Video:
https://github.com/user-attachments/assets/a2946906-6a18-4cda-84f7-2bcbacf44e08

Versions (please complete the following information):
-.NET 8
-Blazor.Bootstrap 3.0.0/3.1.0

  • Blazor Server
  • Blazor Interactive Render Mode: InteractiveServer

Sample code


@page "/testgridpage"   

@rendermode InteractiveServer

<Grid TItem="Product"
      Class="table table-hover border-top"
      Data="products"
      AllowDetailView="true">

    <GridColumns>
        <GridColumn TItem="Product" HeaderText="Id" PropertyName="Id">
            @context.Id
        </GridColumn>
        <GridColumn TItem="Product" HeaderText="Employee Name" PropertyName="Name">
            @context.Name
        </GridColumn>
        <GridColumn TItem="Product" HeaderText="Active" PropertyName="IsActive">
            @context.IsActive
        </GridColumn>
    </GridColumns>

    <GridDetailView TItem="Product">

        <Grid TItem="Ingredient"
              Class="table table-hover border-top"
              Data="GetIngredients(context.Id)">

            <GridColumns>
                <GridColumn TItem="Ingredient" Context="emp1" HeaderText="Id" PropertyName="Id">
                    @emp1.Id
                </GridColumn>
                <GridColumn TItem="Ingredient" Context="emp1" HeaderText="Description" PropertyName="Description">
                    @emp1.Description
                </GridColumn>
                <GridColumn TItem="Ingredient" Context="emp1" HeaderText="Unit" PropertyName="Unit">
                    @emp1.Unit
                </GridColumn>
                <GridColumn TItem="Ingredient" Context="emp1" HeaderText="Quantity" PropertyName="Quantity">
                    @emp1.Quantity
                </GridColumn>
            </GridColumns>

        </Grid>

    </GridDetailView>

</Grid>

@code {
    private List<Product> products = new List<Product> {
        new Product { Id = 1, Name = "Product 1", IsActive = true },
        new Product { Id = 2, Name = "Product 2", IsActive = true },
        new Product { Id = 3, Name = "Product 3", IsActive = true },
        new Product { Id = 4, Name = "Product 4", IsActive = true },
        new Product { Id = 5, Name = "Product 5", IsActive = true }
    };

    private List<Ingredient> ingredients = new List<Ingredient> {
       new Ingredient { Id = 105, ProductId = 1, Description = "Ingredient 1", Unit = "UNIT1", Quantity = 350 },
       new Ingredient { Id = 106, ProductId = 1, Description = "Ingredient 2", Unit = "UNIT1", Quantity = 600 },
       new Ingredient { Id = 107, ProductId = 1, Description = "Ingredient 3", Unit = "UNIT2", Quantity = 13 },
       new Ingredient { Id = 108, ProductId = 1, Description = "Ingredient 4", Unit = "UNIT3", Quantity = 25 },
       new Ingredient { Id = 109, ProductId = 2, Description = "Ingredient 5", Unit = "UNIT1", Quantity = 750 },
       new Ingredient { Id = 110, ProductId = 2, Description = "Ingredient 3", Unit = "UNIT2", Quantity = 13 },
       new Ingredient { Id = 111, ProductId = 1, Description = "Ingredient 4", Unit = "UNIT3", Quantity = 25 },
       new Ingredient { Id = 112, ProductId = 2, Description = "Ingredient 5", Unit = "UNIT1", Quantity = 750 },
       new Ingredient { Id = 113, ProductId = 4, Description = "Ingredient 3", Unit = "UNIT2", Quantity = 13 },
       new Ingredient { Id = 114, ProductId = 5, Description = "Ingredient 4", Unit = "UNIT3", Quantity = 25 },
       new Ingredient { Id = 115, ProductId = 2, Description = "Ingredient 5", Unit = "UNIT1", Quantity = 750 },
    };

    private IEnumerable<Ingredient> GetIngredients(int productId) => ingredients.Where(i => i.ProductId == productId);

    public record class Product
    {
        public int Id { get; set; }
        public string? Name { get; set; }
        public bool IsActive { get; set; }
    }

    public record class Ingredient
    {
        public int Id { get; set; }
        public int ProductId { get; set; }
        public string? Description { get; set; }
        public string? Unit { get; set; }
        public int Quantity { get; set; }
    }
}

Desktop (please complete the following information):

  • OS: Windows11
  • Browser: Firefox
  • Version 132.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions