This is a migrated thread and some comments may be shown as answers.

Bug with sorting columns in grid with detail template

3 Answers 374 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 3
Iron
Iron
Iron
Ivan asked on 22 Sep 2020, 09:06 PM

1. Replace MainLayout with TelerikDrawer https://github.com/telerik/blazor-ui/tree/master/drawer/template
2. Place simple Grid with detail template https://docs.telerik.com/blazor-ui/components/grid/hierarchy
3. Bug - Latest column from parent grid becomes disabled for sorting.

<TelerikGrid Data="salesTeamMembers" @ref="Grid" Sortable="true" FilterMode=@GridFilterMode.FilterMenu Height="780px">
    <DetailTemplate>
           <span>Any template</span>
        </DetailTemplate>
    <GridColumns>
        <GridColumn Field="Id"></GridColumn>
        <GridColumn Field="Name" ></GridColumn>
        <GridColumn Field="Order"></GridColumn>
    </GridColumns>
</TelerikGrid>

If remove detail tempate, all columns becomes availavle for sorting as expected

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Sep 2020, 12:55 PM

Hi Ivan,

Thank you for your report. I made this page where you can Follow the status of this fix: https://feedback.telerik.com/blazor/1485924-cannot-sort-the-last-grid-column-when-in-a-drawer-content-when-the-grid-has-a-detailtemplate

 

Regards,
Marin Bratanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Ivan
Top achievements
Rank 3
Iron
Iron
Iron
answered on 08 Oct 2020, 09:21 AM
Dear developers, this is actually a very unpleasant defect in the control.
If you have a nested template, it becomes impossible to customize the column sorting and you have to disable sorting for the entire grid.
The reason for the error is simple - the source code apparently forgot to take into account that if there is a nested template, the first column of the grid is not a data column. Most likely an error in column indexing.
0
Accepted
Marin Bratanov
Telerik team
answered on 08 Oct 2020, 11:17 AM

Hi Ivan,

I have raised the priority of this as much as possible, yet it also has to follow procedures, and determining its priority in the backlog need to take into account many other factors such as other tasks with higher priority, impact and urgency, and the popularity of this issue - so far this is the only time it has been hit in about half a year since we have the drawer component.

A workaround I can suggest is that you consider using a button in a grid column to show additional details in a Window component instead of the DetailTemplate, in a fashion similar to this custom popup editing example.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Ivan
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Ivan
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or