Completed
Last Updated: 03 Aug 2021 13:40 by ADMIN
Release 2.26.0
James Noonan
Created on: 16 Jul 2021 15:14
Category: Grid
Type: Bug Report
3
Unhandled exception rendering component when setting GridState in code of grid with parent columns

Hi,


I am getting an unhandled exception when setting the GridState of a TelerikGrid with the SetState method that has multi-column headers.


Exception:

Unhandled exception rendering component: More than one sibling of element 'col' has the same key value, 'Telerik.Blazor.Components.GridColumn'. Key values must be unique.

Example grid:

<TelerikGrid @ref=@TestGrid Data=@TestData FilterMode=GridFilterMode.FilterMenu Sortable="true" SortMode=SortMode.Multiple TItem="TestDataItem">
   <GridColumns>
       <GridColumn Title="Test Column 1" Field=@nameof(TestDataItem.TestColumn1) />
       <GridColumn Title="Test Column Group" />
          <Columns>
             <GridColumn Title="Test Column 2" Field=@nameof(TestDataItem.TestColumn2) />
             <GridColumn Title="Test Column 3" Field=@nameof(TestDataItem.TestColumn3) />
          </Columns>
       </GridColumn>
   </GridColumns>
<TelerikGrid>

 

I have tried to set the Id or @key of the columns but nothing has fixed this issue. 


Any help you can provide regarding this is appreciated.

Regards 
0 comments