Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

How to make sure there is enough space between columns' header text?

Hi, I'm using vs2012.
My gridview has 4 columns that has enough width for text but the header text looks like one continuous line of text with no space.  How can I fix this?  Thanks.
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

User generated image
Avatar of lapucca
lapucca

ASKER

Because I bind the data using custom code with a generic collection so I can't use the smart tab to configure.  However, I think you're suggesting to abbreviate my header text, so it will not show so close to the next header text?  Interesting, there is no way to configure to make sure there is a min gap of space between columns?
Despite your description about binding w/ generic collection you still can do it.User generated image
Avatar of lapucca

ASKER

Can do what?  Make the headertext shorter?  Sure, I can do that in my code.  What I'm asking is how to keep the full text but will enough gap between columns.  Thank you,
ASKER CERTIFIED SOLUTION
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

Ah, yes, clicking Edit Columns, it is smart enough to show all my columns.  But looking at your screen shot, I'm not sure how to configure the column to have enough space between the columns?  Thank you.
I will suggest you to add some code to your app that sets the width of each column as you want. Also, in the same code align your fields center, right, etc. Plus add formats (date, money, etc). And then if still your gridview is not wide enough, you can add horizontal scroll to it.

Mike
Avatar of lapucca

ASKER

Yes, that is my question.  How to set width for these 3 columns.  Any example code or url of example code?  Thanks.
Avatar of lapucca

ASKER

Thank you.