Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Height of locked and unlocked columns not match in Kendo Grid

I have Kendo UI Grid witch one locked column, which has dynamic width and height. The Grid's container is resizing in CSS and I'm using kendo.resize($("#grid")) to fit Grid to it and everything works perfecly.

I have also a function triggered on window resize event which is adjusting the columns widths. Colums should occupy whole grid without showing bottom scrollbar if it's possible, but they also have minimum height. So I calculate the columns widths and set it to them, but when I have horizontal scrollbar in the unlocked colums container, the locked container do not match to it.

Normally locked columns shows white area in bottom if there is horizontal scrollbar but when I set the columns widths explicitly it woluld not.

I've reproduced my issue in this fiddle (it's a little simpler than I describe but idea is the same): http://dojo.telerik.com/ADaqe

When i open it grid should looks ok, but when you'll decrease width of right iframe and horizonal scrollbar will show - white area is not shown and just try to scroll the grid to the bottom and see what happen: enter image description here Any help would be appreciated.

like image 583
Jarosław Kończak Avatar asked Mar 17 '23 09:03

Jarosław Kończak


1 Answers

There is private grid function ._adjustLockedHorizontalScrollBar() which doing exacly what I needed:

$(window).on('resize', function () {
    that._adjustLockedHorizontalScrollBar();
    ...
});

Here is updated fiddle: http://dojo.telerik.com/ADaqe/4

like image 87
Jarosław Kończak Avatar answered Apr 01 '23 06:04

Jarosław Kończak