Reduce hiearchy grid width

2 posts, 1 answers
  1. Erik
    Erik avatar
    42 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2018 Link to this post

    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?

  2. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    2480 posts

    Posted 16 Feb 2018 Link to this post

    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.
Back to Top