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

Unable to size grid created from HTML table

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
B Jones
Top achievements
Rank 1
B Jones asked on 18 Jul 2018, 04:14 PM

I have an HTML table that I'm creating a grid from, but I'm not able to change the height. The grid is within a splitter and the splitter pane has a div before the grid but I don't think this is causing the problem. Even without the splitter, I'm not able to size the grid to fill the window.

 

Example:

http://dojo.telerik.com/uzudOzEt/2

 

References:

Resize and Expand the Kendo UI Grid to 100% Height

Expand Grids to Match the Height of TabStrip Containers within Splitter Panes

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Jul 2018, 02:44 PM
Hello,

Having an element with 100% height means that it must not have sibling nodes, as their total height goes above 100%.

With this in mind, it will be easier to let the splitter take care of resizing the container where the grid is, so you can avoid the extra math and just .resize() the grid.

It is also important to note that you need enough data in the grid for the container to get filled up.

That said, here are two examples:

In both examples I intentionally left an extra div with yellow background that wraps the grid so you can know that if you see it, the grid is not 100% tall, and also - to showcase how all elements in the tree must have 100% height or pixel height (as the splitter pane) for this to work out. You can remove this div later, it is here to showcase and for testing.


Regards,
Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
B Jones
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or