Duplicated
Last Updated: 05 Aug 2020 06:59 by ADMIN
ben
Created on: 04 Aug 2020 20:24
Category: UI for Blazor
Type: Bug Report
0
Grid doesn't render when using filter and detail template

Grid errors with both filtering and a detail template:

<Telerik.Blazor.Components.TelerikGrid Data="@GridData" FilterMode="Telerik.Blazor.GridFilterMode.FilterRow">

    <GridColumns>
        <Telerik.Blazor.Components.GridColumn Title="Name" Filterable="true" Field="@nameof(GridItem.Name)"></Telerik.Blazor.Components.GridColumn>
        <Telerik.Blazor.Components.GridColumn Field="@nameof(GridItem.Id)" Filterable="true" Title="Id"></Telerik.Blazor.Components.GridColumn>
    </GridColumns>

    <DetailTemplate>
            <div>Custom Template</div>
    </DetailTemplate>

</Telerik.Blazor.Components.TelerikGrid>
@code {

    List<GridItem> GridData { get; set; } = new List<GridItem>();

    protected override void OnInitialized()
    {
        GridData = GenerateData();
    }

    private List<GridItem> GenerateData()
    {
        List<GridItem> data = new List<GridItem>();
        for (int i = 0; i < 5; i++)
        {
            GridItem mdl = new GridItem { Id = i, Name = $"Name {i}" };
            data.Add(mdl);
        }
        return data;
    }

    public class GridItem
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }

}

The grid renders correctly with either the DetailTemplate or FilterMode, but not both.

Example repo - https://github.com/kviiim/BlazorDetailTemplateGridFilterIssue

-Ben

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
1 comment
ADMIN
Svetoslav Dimitrov
Posted on: 05 Aug 2020 06:59

Hello Ben,

We already have a logged bug report regarding the Grid throwing when FilterRow and DetailTemplate are used together. You can see it from this link. We will provide a fix with our next release 2.16.0, which is planned to be live by the end of this week. 

Regards,
Svetoslav Dimitrov
Progress Telerik