Adjust Column width at runtime??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Visual Studio 2003 / C#

Is it possible to change the width of the columns in a datagrid at runtime?
I am generating and populating a dataset at runtime, then binding a datagrid
to this dataset. The only problem is all the columns in it are about 75 in
width, and this looks lame in the view as there is over half of the datagrid
unused. I want to extend one of the columns, a description column, to fill
the datagrids width. Is this possible?

Thanks

Steve
 
In the end I created a TabStyle with the columns I needed at the widths I
wanted, but with no mappings, then at runtime after I have created and
populated the dataset I just map the relevant fields to those in th
TableStyle. Which worked a treat.

Cheers anyway.
 
Sorry, I thought for some reason you were talking about the Infragistics
grid.

Are you using the web or windows grid? I am pretty sure in either case
there's got to be a Width property for the columns.
 
Back
Top