Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid Column Widths

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
Is there a way in which I can set the widths of DataGrid columns on the fly ?
Initially they all start with a width of 50 - how do I set some to be wider than the other - for instance the second field might be a long string and I might want this to be fully seen in the grid.

Any help would be appreciated.
I'm new to the world of C#/.NET

Thanks in advance.

Steve
 
On your search feature of the IDE, look up "GridTableStylesCollection Class " and that will show you what you need with some example code.
 
Thanks.
I actually found the help file last night whilst tearing my hair out and got the required results.
Thanks again
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top