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

Odd behivior with the scroll bar in kendo Grid

2 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jimm
Top achievements
Rank 1
Jimm asked on 27 Jun 2013, 04:43 PM
EDIT:
I have been debugging and found the the content area height is being set to 1 pixel less than the total height.  
from kendo.all.js:

_setContentHeight: function() {
            var that = this,
                options = that.options,
                height = that.wrapper.innerHeight(),
                header = that.wrapper.children(".k-grid-header"),
                scrollbar = kendo.support.scrollbar();

            if (options.scrollable) {

                height -= header.outerHeight();

.....

the header.outerHeight() is returning 1 when it should be returning 41 or so for this particular grid.  not sure whats going on,  I will try and get a jsfiddle up and running.

Regards,
jimm
 


I have found some odd behavior when trying to create a grid.

please see the attached files in order:
First: notice the grid content height is shorter than the actual displayed content.  this grid is created by calling .kendoGrid() on an html table. 
CODE:
$('.ToKendoGrid').kendoGrid({ scrollable: false });
$('.ToKendoGridScroll').kendoGrid({ scrollable: true, height: 325 });

the html table is created via partial mvc views and when not kendo gridified it looks correct.

Second I have changed what is displayed on the current tab by changing the dropdown list to only show a specific set of information.

Third I have gone back to all information and the grid is now displaying correctly. 

Thoughts?

Regards,
jimm

One a side note I tried to submit this request through chrome and the file upload feature did not display correctly.

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 01 Jul 2013, 08:41 AM
Hello Jimm,

Grid layout issues may occur if the widget is initialized inside a hidden container. This prevents Javascript size calculations from working properly. Possible workarounds include:

1. Create Kendo UI widgets in different order. For example, if the Grid is inside a TabStrip, then create the Grid first.

2. Create Kendo UI widgets at a different time. For example, if the Grid is inside a TabStrip, then create it in the TabStrip's activate event.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Accepted
Jimm
Top achievements
Rank 1
answered on 03 Jul 2013, 03:09 PM
Dimo,
you were close with the activate event, that worked until i changed the dropdown list to change the data being show and then it barfed, however the contentload event worked as I needed it to.  

Thanks ,
Jimm
Tags
Grid
Asked by
Jimm
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jimm
Top achievements
Rank 1
Share this question
or