Set columns to same width

4 posts, 0 answers
  1. Edwin
    Edwin avatar
    4 posts
    Member since:
    May 2014

    Posted 05 Jun 2014 Link to this post

    Hi,

    I have a requirement of setting column widths to a uniform value, based on the widest column within a property group description. 

    Attached is a drawing illustrating the requirement.

    Is this possible to do?

    Thanks,
    Edwin


  2. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 06 Jun 2014 Link to this post

    Hello Edwin,

    The only solution I can suggest you in order to achieve the desired scenario would be to set the ColumnWidth property of the PivotGird to the desired Width - this way all of the columns will have the same Width. However please note that afterwards the Width will not be changing depending on the content of the cells.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Edwin
    Edwin avatar
    4 posts
    Member since:
    May 2014

    Posted 06 Jun 2014 in reply to Kalin Link to this post

    Hi Kalin,

    Can the column width be set on a per-column basis using a value converter?  The suggested solution affects all columns including the totals columns.  This results either in columns that are too wide, or a truncated totals column.

    Regards,
    Edwin
  5. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 09 Jun 2014 Link to this post

    Hi Edwin,

    What I can suggest you would be to check the CustomHeaderTemplate example from our XAML SDK repository. Using the same approach you would be able to apply a Template with different Width depending on the current header. You can use an IValueConverter as well and use single template and change the Width. For your convenience I have modified the same example in order to demonstrate the exact approach.

    Please check it and let me know if it helps.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top