Solved

C# VS 2005 DataGridView column width

Posted on 2006-06-13
1
520 Views
Last Modified: 2012-06-21
I am binding a select statements results which is stored into a Datatable to the DataGridView control.

The data is all there but I need to make it look better.

How do I get the Headers to autofill the entire width of the DataGridView and can I get rid of the column of boxes on the far left?
0
Comment
Question by:Rowdyone52
1 Comment
 
LVL 12

Accepted Solution

by:
topdog770 earned 500 total points
ID: 16895360
<< How do I get the Headers to autofill the entire width of the DataGridView >>
The datagridview will have a collection of columns.   Each column has a AutoSizeMode property, setting this property to Fill will cause that specific column to fill in the 'blank' portion of the datagridview.

<< can I get rid of the column of boxes on the far left? >>

Setting your DataGridView('s).RowHeadersVisible = false will cause the column of boxes on the far left ( the row headers) to no longer show.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
In WPF / C# binding a local database in code behind 1 24
Server Error 11 47
C# HTTP GET method sample code 3 41
Angular - break the dataset in chunks? 7 39
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now