TreeList With Scrolling and Locked Columns not displaying right

2 Answers 131 Views
Grid TreeList
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Lee asked on 28 Mar 2023, 04:43 PM | edited on 28 Mar 2023, 07:38 PM

I have a treelist with scrolling and locked columns. Unfortunately, when the screen is wide enough to display all of the columns, the grid doesn't expand to fit the headers as seen in the included screenshot. Also, when I do expand the columns past the max height of the grid, I do not get a scrollbar and the ones below get cut off. Can you help with this? This same table works in a grid (minus the expansion piece, hence converting to a treelist). It does appear there is a scrollbar but it is outside of the table's viewable area. 

Here is a dojo: https://dojo.telerik.com/@dojolee/oraQASED

Attached is an image of what I am seeing on my site.

Here is my code: 

$("#tileTable").kendoTreeList({
            dataSource: {
                data: treeDataSource,
                schema: {
                    model: {
                        id: "hierarchyId",
                        parentId: "parentHierarchyId",
                        fields: {
                            parentHierarchyId: {
                                type: "string",
                            }
                        }
                    }
                }
            },
            sortable: false,
            columns: columns,
        }).data("kendoTreeList");

2 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 31 Mar 2023, 11:13 AM

Hi,

After examining the dojo I noticed that all the columns were locked. This will indeed cause problems as when locked columns are used non-locked columns should be present as well. By changing some of the columns to not be locked I was able to resolve the vertical scroll issue. As for the horizontal scroll, such a scroll will not appear unless the columns sum width exceeds the table width. In the code I noticed that there are columns with small widths and when they are arranged next to each other their sum width is less than that of the treelist. If larger widths are provided a scroll will appear. 

Here is a modified dojo that implements both of the suggestions and resolves the issues on hand.

Regards,
Angel Petrov
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/.

Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
commented on 31 Mar 2023, 11:22 AM

Thank you for catching the first part. As for the width, I cannot guarantee how wide the user's monitor is and therefore will need it to stretch to fill the width. I think I solved this with css by adding table: { min-width: 100% }. Do you forsee any issues with that?
0
Angel Petrov
Telerik team
answered on 05 Apr 2023, 10:47 AM

Hello,

I do not see a problem with this solution as long as the columns are aligned. For additional safety however I recommend testing it thoroughly.

Regards,
Angel Petrov
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 TreeList
Asked by
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Answers by
Angel Petrov
Telerik team
Share this question
or