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.
C#ASP.NET

Avatar of undefined
Last Comment
lapucca

8/22/2022 - Mon
Mike Eghtebas

GV Header
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?
Mike Eghtebas

Despite your description about binding w/ generic collection you still can do it.gv header
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
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
Mike Eghtebas

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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.
Mike Eghtebas

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
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
lapucca

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

ASKER
Thank you.