Completed
Last Updated: 04 Aug 2023 13:19 by ADMIN
Release 4.5.0 (08/30/2023) (R3 PI2)
Peili
Created on: 26 Jul 2023 02:29
Category: UI for Blazor
Type: Bug Report
1
Telerik Blazor Grid with ExpandoObject and Group Header

My grid bind to ExpandoObjects, and I would like to implement a Group Header.

So I referenced these two documents
https://docs.telerik.com/blazor-ui/knowledge-base/grid-binding-to-expando-object

https://docs.telerik.com/blazor-ui/components/grid/columns/multi-column-headers

 

From the first document, it make sense to me that we need to set FieldType for each column that binds to ExpandoObject, but it seems this restriction also applies to the group header column, which does not make sense.

Foe example:

<TelerikGrid Data="@GridData"
             Pageable="true"
             Sortable="true"
             FilterMode="@GridFilterMode.FilterRow">
    <GridColumns>
        <GridColumn Title="Test Group Header">
            <Columns>
                <GridColumn Field="PropertyInt" Title="Int Column" FieldType="@typeof(int)" />
                <GridColumn Field="PropertyString" Title="String Column" FieldType="@typeof(string)" />
                <GridColumn Field="PropertyDate" Title="DateTime Column" FieldType="@typeof(DateTime)" />
            </Columns>
        </GridColumn>
    </GridColumns>
</TelerikGrid>

 

I get error:

 

I need to set FieldType on the "Test Group Header" column to an arbitrary value to get rid of this error.

 

1 comment
ADMIN
Dimo
Posted on: 01 Aug 2023 10:35

Hello Peili,

You are right. It's not necessary to throw an exception in this case and we will fix this. Thanks for reporting!

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!