Locked column height is about 16px too short

1 Answer 22 Views
Grid
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Lee asked on 14 Apr 2022, 02:46 PM

I have a grid on my page with the first column locked. Unfortunately, the height of the locked column is often too short, depending on the exact width of the monitor. I say "exact width" because I mean that at 1607px then it shows the white space but not at 1606 or 1608, for example. I have included a screenshot below and circled the area I am referring to in green. In the screenshot there is only one record but it doesn't seem to matter how many records there are, the last one is cut off in the locked column. It appears the k-grid-content-locked div is getting a height of 18px dynamically applied to it when it should have a height of 35px;

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 19 Apr 2022, 11:14 AM

Hello, Lee,

The locked container has slightly less height to compensate for the horizontal scrollbar that would normally appear if there are a lot of columns.

You could set the height of the locked table to be the same as the height of the right table, however you should keep in mind that in a scrollable Grid, there could be a discrepancy between the rows when you scroll all the way to the bottom:

To achieve the above behavior, you can utilize the dataBound event:

              	dataBound: function() {
                  let unlockedHeight = this.content.height();
                  this.lockedContent.height(unlockedHeight);
                },

Result(no white space):

Dojo:

https://dojo.telerik.com/@gdenchev/AZESeSIN 

Best Regards,
Georgi Denchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Georgi Denchev
Telerik team
Share this question
or