Skip to content

Grid: column summaries are misaligned when detail view is enabled #1199

@theewingdev

Description

@theewingdev

NOTE: We do not look at .zip attachments for issue investigation.

Describe the bug
When both AllowDetailView and AllowSummary are set to true, the column summaries are placed one cell to the left of where they should be.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Grid with both a detail view and summaries enabled
  2. Verify that the summaries are misaligned

Expected behavior
The summaries to be properly aligned with their columns.

Screenshots

Image Image

Versions (please complete the following information):

  • .NET Version: .NET 9
  • BlazorBootstrap: 3.4.0
  • Blazor WebAssembly / Server: Server
  • Blazor Interactive Render Mode: Server
  • Blazor Interactivity Location: Global

Sample code

<Grid
    TItem="Foo"
    Data="foos"
    AllowDetailView="false"
    AllowSummary="true"
    Class="table table-striped">
    <GridColumns>
        <GridColumn TItem="Foo" HeaderText="Name" PropertyName="Name" SortKeySelector="item => item.Name">
            @context.Name
        </GridColumn>
        <GridColumn TItem="Foo" HeaderText="Score" PropertyName="Score" SortKeySelector="item => item.Score" SummaryType="GridSummaryColumnType.Average" SummaryValueDisplayFormat="N2">
            @context.Score
        </GridColumn>
    </GridColumns>
</Grid>

`
@code {

private List<Foo> foos = new()
{
    new Foo { Name = "Alice", Score = 85 },
    new Foo { Name = "Bob", Score = 92 },
    new Foo { Name = "Charlie", Score = 78 }
};

private class Foo
{
    public required string Name { get; set; }
    public int Score { get; set; }
}

}`

GitHub repo

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: 15.7

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions