Adjust Column width at runtime??

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
 
M

Marina

The UltraGridColumn class has a Width property. Just change that to whatever
you want.
 
G

Guest

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.
 
M

Marina

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top