Item appearing when datagrid columns are empty

Currently we are using dynamic column headers, after the last update the data grid empty template is not triggered anymore because the datagrid thinks it has one item in it. This only happens when the list of columns is empty, if there is a column definition available the amount of items is shown correctly.

is it expected behavior or a bug?

We were on 4.24.3 (nuget source) and update to 4.29.8.

Code example below:

@using RadzenBlazorDemos.Models.Northwind

<h3 class="mt-4">Render without colums, empty template is not shown and item count appears as 1</h3>
<RadzenDataGrid Data="@data"
    AllowPaging="true"
    ShowPagingSummary="true"
    PagerAlwaysVisible="true">
    <EmptyTemplate>
        <p style="color: lightgrey; font-size: 24px; text-align: center; margin: 2rem;">No records to display.</p>
    </EmptyTemplate>
    <Columns>
        @foreach (var column in @columnData2)
        {
            <RadzenDataGridColumn Title="@column" Resizable="true">
                <Template>
                    @column
                </Template>
            </RadzenDataGridColumn>
        }
    </Columns>
</RadzenDataGrid>

<h3 class="mt-4">Render with colums, empty template appears as expected and item count is 0</h3>
<RadzenDataGrid Data="@data"
    AllowPaging="true"
    ShowPagingSummary="true"
    PagerAlwaysVisible="true">
    <EmptyTemplate>
        <p style="color: lightgrey; font-size: 24px; text-align: center; margin: 2rem;">No records to display.</p>
    </EmptyTemplate>
    <Columns>
        @foreach (var column in @columnData)
        {
            <RadzenDataGridColumn Title="@column" Resizable="true">
                <Template>
                    @column
                </Template>
            </RadzenDataGridColumn>
        }
    </Columns>
</RadzenDataGrid>
@code { 
    string emptyText = "No Items to display!";
    List<Employee> data = new List<Employee>();

    List<string> columnData = new List<string>{
        "Test", "Test2"
        };
    List<string> columnData2 = new List<string>{
        };
}

We've not changed anything related to EmptyTemplate. I've just tested this and it appears that it will work exactly the same with the version you've stated:



Thanks for checking, I double checked my version and it appears the software was on 4.24.1 instead of 4.24.3. I will test my software again to see if the issue was indeed already there.

It's the same with this version:


This is how this feature works from the very beginning.

Thanks! We will work with this then!