We help IT Professionals succeed at work.

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

lapucca
lapucca asked
on
113 Views
Last Modified: 2015-01-05
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.
Comment
Watch Question

Mike EghtebasDatabase and Application Developer

Commented:
GV Header

Author

Commented:
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 EghtebasDatabase and Application Developer

Commented:
Despite your description about binding w/ generic collection you still can do it.gv header

Author

Commented:
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,
Database and Application Developer
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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 EghtebasDatabase and Application Developer

Commented:
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

Author

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

Author

Commented:
Thank you.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.