Resize columns in a datagrid.

  • Thread starter Thread starter Mark Broadbent
  • Start date Start date
M

Mark Broadbent

Anyone know how to resize the columns in a datagrid, I ve tried setting the
PreferredColumnSize, Invalidating and Updateing but to no avail.
Im sure it is pretty easy?

--

--

Br,
Mark Broadbent
mcdba , mcse+i
=============
 
Dear Mark,

The extended framework I have developed contains methods for manipulating
Windows Forms data grid. One of them resizes the columns to fit their
content.

E-mail me for your free copy: (e-mail address removed)
Your acceptance of the license agreement will be required.

Ori Millo
 
Thanks. But there must be a simple property to change column widths without
resorting to third party controls. Secondly I no longer use my email with
untrusted sources, I am sick to death of spammers (even though I doubt you
are one).

--

--

Br,
Mark Broadbent
mcdba , mcse+i
=============
 
You are right, I am not. If you can think of a way that will make you feel
safer I'm game.

There is a simple property: when you create DataGridTableStyle you can set
the width of each DataGridColumnStyle after you determined the size of the
text in each row.

About the extensions library - who knows, it is possible that it will do for
you more than just adjust column sizes.

Ori
 
Back
Top