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

Reduce hiearchy grid width

1 Answer 9 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 15 Feb 2018, 01:32 PM

I have a 10 column grid with a hierarchy grid consisting of only 2 columns. By default it seems the hierarchy grids fills the space of the parent grid and thus the 2 columns are stretched across the entire width.

I have tried explicitly setting a width for each column of the hierarchy grid but they do not seem to have any effect whatsoever. 

Is there a way to set hierarchy grid total width or be able to set column widths of the hierarchy grid?

1 Answer, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 16 Feb 2018, 02:31 PM
Hi Erik,

In order to set smaller width for the detail Grid you can explicitly set the width of the detail Grid component. This can be done via the HtmlAttributes property. 


.HtmlAttributes(new {style="width: 500px;" })

You can also consider making the detail Grid scrollable in case the combined width of the columns is wider than the detail Grid.


Regards,
Viktor Tachev
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
Erik
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or