Completed
Last Updated: 14 Sep 2020 08:10 by ADMIN
Release 2020.R3
IT
Created on: 09 May 2020 16:05
Category: Grid
Type: Bug Report
2
autoFitColumn not working with locked columns and multi-column headers
Hello,

autoFitColumn not working for columns if they are locked and in multi-column header. Example is below. If I remove "locked: true" from first column, than it works good. Can you help me please?

 
<!DOCTYPE html>
<html>
<head>
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
 
     
     
     
 
</head>
<body>
        <div id="example">
            <div id="grid"></div>
 
            <script>
                $(document).ready(function () {
                    $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                            },
                            pageSize: 20
                        },
                        height: 550,
                        groupable: true,
                        sortable: true,
                        resizable: true,
                        reorderable: true,
                        pageable: true,
                        columnMenu: true,
                        dataBound: function() {                         
                          this.autoFitColumn("CompanyName");
                          this.autoFitColumn("ContactTitle");                         
                        },
                        columns: [{                           
                            title: "Group",
                            width: 420,
                            locked: true,
                            columns: [{title: "CompanyName",width:60, field: "CompanyName"},
                                        {title:"ContactTitle", width:60, field: "ContactTitle"}]
                            },
                        {
                            title: "Contact Info",
                            columns: [{
                                field: "ContactTitle",
                                title: "Contact Title",
                                width: 200
                            },{
                                field: "ContactName",
                                title: "Contact Name",
                                width: 200
                            },{
                                title: "Location",
                                columns: [ {
                                    field: "Country",
                                    width: 200
                                },{
                                    field: "City",
                                    width: 200
                                }]
                            },{
                                field: "Phone",
                                title: "Phone"
                            }]
                        }]
                    });
                });
            </script>
        </div>
 
 
</body>
</html>
1 comment
ADMIN
Plamen Mitrev
Posted on: 12 May 2020 13:21

Hello,

I investigated the scenario, where you use autoFitColumn in multi-columns headers grid with locked column and it turns out that there is a bug. This is why I converted this thread to a public bug report on our feedback portal. Our engineering team will analyze the issue further and then plan it for future releases.

At this point, there is no workaround that I can provide, other than setting the "locked" configuration to "false" or remove it, as you suggested.

Thank you for bringing this issue to our knowledge and for your understanding.

Regards,
Plamen Mitrev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.