473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DataGridView Column Width

Hi,

I need to make the last column of my datagridview wide enough to contain a
long string, and I can use the horizontal scrollbar to see all of the data.

How can I do this? Currently the scrollbar does not show up. I wish that I
can make the column fit the data automatically.

Thanks.
Jun 27 '08 #1
1 3140
On a column-by-column basis you can set the auto-size mode - for example:

{blah}.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;

Marc
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob | last post by:
Dear All, I am having a few issues with DataGridViews. Here is what I have. In a windows form I have added a DataGridView. My data is stored in an array of instances of a class with several...
3
by: Bob | last post by:
Thinking two things, 1- Creating a userControl -yeah you guessed it, a multi column drop down combobox - I've looked at several articles and did not find what I need, one that's bindable and that...
1
by: Lars Erik Nes | last post by:
Hi all I have a datagridview which is bound to a dataset. The datagridview is filled at run-time. How can set the column-width for each column. I have tried : DataGridViewColumn column =...
3
by: jer84 | last post by:
Hi I've been looking through the properties and I can't seem to find a way to adjust the column width. Is there a way to do this? Also, when the datagridview is displaying data, there is a...
2
by: Rich | last post by:
Hello, Some database applicatins have a tooltip feature where when you are dragging the scrollbar of the table view a tooltip appears next to the mouse cursor displaying the approximate record...
4
by: Terry Olsen | last post by:
How can i tell if a row in my DataGridView has been edited? I'm loading a DataTable with ID3 information from MP3 files and using that as the datasource for the DataGridView. I'm letting the user...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
3
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I am wondering what is considered a best practice for setting column widths to fit the data for a DataGridView (.Net 2.0) that was created on-the-fly from an arbitrary query. What I would probably...
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
0
by: priyamtheone | last post by:
I have a datagridview with a button column as one of its column collection. The width of the button column is say 50 but the problem is the button editing control within the cell of that column is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.