Table columns - fit content and page width

2 posts, 0 answers
  1. Simon
    Simon avatar
    57 posts
    Member since:
    May 2008

    Posted 08 Oct 2019 Link to this post


    We have a table with static column widths for all columns but one. We calculate the width for the Description column so that the table width is 100% of the containing page. We are using the following binding for the Description column:

    Width  =WidthForDescriptionColumn(Fields.BillableSection)

    where WidthForDescriptionColumn simply subtracts predefined column widths from the page width based on their visibility.

    One of our customers complained that they use large numbers (like 8 digits + 2 decimal) and they get wrapped in the column. We decided to implement dynamic column widths for some columns using an approach mentioned at . It did work, however since WidthForDescriptionColumn still returned a static value, the rightmost column got pushed beyond page edge.

    The question is, is there a simpler way of achieving the following scenario:

    1. Some table columns should have static width.

    2. Some table columns should have dynamic width based on its content (actually something like min-width).

    3. One of table columns should have dynamic width which is calculated so that the table width would be 100% of the containing page.


  2. Nasko
    Nasko avatar
    1094 posts

    Posted 11 Oct 2019 Link to this post

    Hi Simon,

    Once a column of the table is increased in size using the mentioned bindings approach, you will need to make sure that another column (or all other columns) is decreased in size by the same amount, so the whole table does not grow outside the bounds of the page.

    We do not have an out-of-the-box autosize feature implemented at the moment and there is no easier way to achieve the scenario. You can request such feature in our Ideas & Feedback portal.

    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top