How do I size the columns in a table?

Stimulsoft Reports.NET discussion
Post Reply
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

How do I size the columns in a table?

Post by Scottioioio »

I have a report with a table that displays the rows from a data source. The table/data source has five columns. The table auto-sizes each column in the table so that they are equal widths, but some of the columns contain lengthy text values while other columns are numeric IDs.

How do I configure the table so that, say, column 1 is just 200 pixels wide or 10% of the width or whatever, while column 2, say, is 500 pixels wide or 25% of the width or whatever?

Thanks!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How do I size the columns in a table?

Post by HighAley »

Hello.

Please, try to disable the Auto Width property.

Thank you.
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: How do I size the columns in a table?

Post by Scottioioio »

Thank you for your assistance, Aleksey.

In case anyone else bumps into this problem, what I did was set the Table's Auto Width property to Table and its Auto Width Type property to Full Table. Next, I went to each column in the table and set the Can Shrink property to True for those columns I wanted to be less wide and the Can Grow property to True for those that I wanted to fit the larger text.

Aleksey, is that what you had in mind with your suggestion, or are there other ways I can have more fine-grained control over the column widths, for instance the ability to say for one specific column that it should have a width of, say, 50% while the rest are auto-sized?

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How do I size the columns in a table?

Post by HighAley »

Hello.

You don't need to change Can Shrink and Can Grow properties. They are change the hight only.
It's enough to set the Auto Width property to Table and Auto Width Type property to Full Table or Last Columns.

Thank you.
Post Reply