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

Set columns to same width

3 Answers 65 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Edwin
Top achievements
Rank 1
Edwin asked on 05 Jun 2014, 01:57 PM
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


3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 06 Jun 2014, 01:09 PM
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.
 
0
Edwin
Top achievements
Rank 1
answered on 06 Jun 2014, 02:16 PM
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
0
Kalin
Telerik team
answered on 09 Jun 2014, 11:42 AM
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.
 
Tags
PivotGrid
Asked by
Edwin
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Edwin
Top achievements
Rank 1
Share this question
or