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

Progress indicator not visible when scrollable is true and height not set

3 Answers 372 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cory
Top achievements
Rank 1
Cory asked on 01 Aug 2014, 10:37 PM
I've noticed that when I create a grid where scrollable is true (or default) and the height is not specified that the progress indicator is not visible. However, if I change the _progress function on the Grid to look like the following, the indicator is displayed and hidden as expected, regardless of whether/how scrollable or height is specified.

_progress: function(toggle) {
    var element = this.element;
 
    if (this.lockedContent) {
        element = this.wrapper;
    } else if (this.element.is("table")) {
        element = this.element.parent();
    } else if (this.content && this.content.length) {
        element = this.content.height() === 0
            ? this.content.parent()
            : this.content;
    }
 
    kendo.ui.progress(element, toggle);
}

From what I can tell, this produces the expected results in each scenario I've tested. Considering pull requests are not accepted for the Grid, I was wondering if someone can review this and, if acceptable, include in the next release.

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Aug 2014, 10:28 AM
Hi Cory,

Thanks for the suggestion. We would like to refrain from measuring the data area height on each rebind. I recommend you to apply a min-height style to the .k-grid-content class in order to ensure that the loading indicator is always visible. A value of 50px will be sufficient.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Cory
Top achievements
Rank 1
answered on 05 Aug 2014, 03:21 PM
While your recommendation will allow the progress indicator to be displayed, it also leaves whitespace in the data area when there are no results. This becomes a different experience when compared to grids that have scrollable set to false, as the data area is collapsed so no whitespace is displayed (see attached).
0
Dimo
Telerik team
answered on 07 Aug 2014, 06:47 AM
Hi Cory,

The fact that a Grid height is not set indicates that vertical scrolling is not important. If horizontal scrolling is not required either, then you can disable scrolling altogether, which will make the loading indicator display over the whole Grid.

In the vast majority of cases scrollable Grids are used with a height, which makes empty spaces possible if there are too few or no items. We do not regard this as an UI issue, as scrollability makes sense only together with predefined dimensions.

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
Cory
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Cory
Top achievements
Rank 1
Share this question
or