I am trying to make a frame with a DBGrid that will serve for more than 10 tables with half of its fields as defaults, and other fields exclusive for each table
For TRUEDBGRID .net you can do this:
Private Sub AutoSizeGrid(Grid As C1.Win.C1TrueDBGrid.C1TrueDBGrid)
For Each Sp As C1.Win.C1TrueDBGrid.Split In Grid.Splits
For Each Cl As C1.Win.C1TrueDBGrid.C1DisplayColumn In Sp.DisplayColumns
Cl.AutoSize()
Next
Next
End Sub
For TrueDbGrid ActiveX in vb60 this (this code not include splits):
Public Function APEXGridAutoFix(Grid As TrueOleDBGrid80.TDBGrid)
Dim Col As TrueOleDBGrid80.Column
For Each Col In Grid.Columns
Col.AutoSize
Next
End Function