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

DetailTemplate use all remaining space

1 Answer 183 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nico
Top achievements
Rank 1
Veteran
Iron
Nico asked on 05 Jan 2021, 07:57 PM
Hello!
I want to use the Grid´s DetailTemplate to view another grid, let´s call it detaildatagrid.
Currently I have set the width of the detailsdatagrid to 65vw, because at 100% it will use two times of my monitor width and the horizontalscrolling is not working anymore.
Is there a way to force the detaildatagrid to use the remaining seeable width?

thank you & best regards
Nico

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 05 Jan 2021, 08:58 PM

Hello Nico,

The DetailTemplate is just a row in the grid that has one <td> that spans all the data cells that "normal" rows have. Thus, setting the dimensions of the content inside is entirely up to you - using 100% width means that the content will be as wide as the row, and that is determined by the entire grid and the rest of its columns.

If you have many columns and you don't want your content to be too wide, you could consider putting the details in a Window component that you show on a button click, instead of the DetailTemplate of the grid.

 

Regards,
Marin Bratanov
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
Grid
Asked by
Nico
Top achievements
Rank 1
Veteran
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or