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

dynamically set treeview and grid height

1 Answer 13 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
erwin asked on 14 Jan 2021, 02:37 PM

     Hi,

I have a treeview and a grid side by side on a page with bootstrap 4 layout. When the user selects a node in the treeview, the grid datasource refreshes. This works ok.

Now I'd like to size the grid and the treeview dynamically to the size of the browser window minus the header of the page, so that the treeview and the grid display a scrollbar (if needed) independently. The tree is load on demand and can contain a lot of elements.

Im struggling with setting the treeview and the grid height in the window resize handler.

Currently the grid is not paging, it maybe a requirement to have the grid paging then I would have to set the pagesize dynamically to display as much rows as possible within the available space..

Thanks for your help

 

Erwin

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 19 Jan 2021, 09:29 AM

Hello, Erwin,

Please refer to our Responsive Web Design article for some guidance about resizing. You can try the kendo.resize method or use the resize method separately for the components you are using. 

Alternatively, you can use the setOptions method to change the height on window.resize event. The same should be possible to set the paging functionality for the Grid.

Let me know if you have any further questions.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TreeView
Asked by
erwin
Top achievements
Rank 1
Veteran
Answers by
Martin
Telerik team
Share this question
or