This is a migrated thread and some comments may be shown as answers.

Last row gets cut off when using virtual scrolling and setting the grid height after filtering

1 Answer 217 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek Kepler
Top achievements
Rank 1
Derek Kepler asked on 13 Sep 2013, 10:39 PM
Please see the attached screenshot.

This only happens when we have both the virtual scrolling and the height set and then we filter.  It doesn't always happen, usually only after filtering on multiple columns.
@(Html.Kendo().Grid<BulletinModel>()
                .Name("Grid")
                .Editable(ed => ed.Mode(GridEditMode.PopUp).Window(w => w.Width(950)))
                .Selectable()
                .Scrollable(scrollable => scrollable.Virtual(true))
                .Sortable()
                .HtmlAttributes(new { @style = "height: 600px;" }))
Is there any way around this behavior?  Maybe setting the scrollable height on one of the containers?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 17 Sep 2013, 02:36 PM
Hi Derek,

Virtual scrolling relies on calculations about the average row height, which is used to calculate the height of the fake vertical scrollbar. Depending on the variety and quantity of row heights, and the currently loaded data, the calculation of the average row height may not be accurate. In such cases we recommend ensuring that most rows are equally high, e.g. by defining a large-enough height for all of them. For example:


#Grid  .k-grid-content  td
{
      height: 100px;
}


Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Derek Kepler
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or