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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I permanently adjust the column width in a DataGrid. 1

Status
Not open for further replies.

THOMASNG

Technical User
May 3, 2002
254
US
I see that I can interactively adjust the column widths at Runtime, but they aren't permanent. How can I interactively make changes in the column widths permanently?
 
How do I get the resulting widths and save them
to a file?
 
I got it. I just fiddled with DefColWidth until it was
a good value for all columns.
 
To get datagrid column widths: (zero-based collection)

Dim lngWidth as Long
lngWidth = DataGrid1.Columns(1).Width

To set them:

DataGrid1.Columns(1).Width = 1000
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top