-
Jun 12th, 2001, 06:41 AM
#1
Thread Starter
Fanatic Member
DataGrid Control - AutoSize Columns
How can I Autosize the columns in a Datagrid, so that each column is as wide as the maximum length of any data held in it?
Mindcrime : )
ICQ 24003332
VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8
-
Jun 12th, 2001, 07:18 AM
#2
Frenzied Member
TrueDBGrid (www.componentone.com) does that (as well as many other things) very well.
TrueDBGrid1.Columns(x).AutoSize
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Jun 12th, 2001, 12:30 PM
#3
Thread Starter
Fanatic Member
Another silly question!!
I can see an advantage of being in the position where my boss would folk out for a control like that, but its for internal program
Have got around this by doing a loop around the visible rows, populting the required column into a autosized label and reutrning the maximum length.
Only trouble is, the record pointer moves down the grid when I move next row.
Is there any way of locking the grid while I do this to prevent the pointer moving?
Also, how can I select all the records without the recordselector moving? Is it bookmarks or something?
Mindcrime : )
ICQ 24003332
VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|