Unplanned
Last Updated: 15 Dec 2022 17:11 by ADMIN
John
Created on: 15 Dec 2022 16:55
Category: Grid
Type: Bug Report
0
DetailItemTemplate colspan incorrect when AllowColumnResize is set to true and hiding at least one column
When having at least one hidden column and the AllowColumnResize is set to true, the table cells in the DetailItemTemplate do not get the correct colspan value, hence braking the table structure.
1 comment
ADMIN
Attila Antal
Posted on: 15 Dec 2022 17:11

Hello John,

Thank you for reporting the issue! 

 

Indeed the colspan attribute set for the TD element inside of the DetailItemTemplate is incorrect causing the table to brake.

 

Workaround

A possible workaround would be to adjust the Table cell (TD) elements' colspan based on the visible columns:

function OnGridCreated(grid, args) {
    if (grid.ClientSettings.Resizing.AllowColumnResize) {
        var masterTable = grid.get_masterTableView();
        var visibleColumnsCount = masterTable.get_columns().filter(col => col.get_visible()).length;

        $(masterTable.get_element()).find('tbody > tr > td[colspan]').attr('colspan', visibleColumnsCount);
    }
}

 

Regards,
Attila Antal
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/.