Solved

C# VS 2005 DataGridView column width

Posted on 2006-06-13
1
526 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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