Adjust DataGrids Column Width Based on Longest Field in Underlying Source
Category:
DatabaseType:
SnippetsDifficulty:
IntermediateAuthor:
Masino SinagaVersion Compatibility: Visual Basic 6
More information:
When you display data from a database to a DataGrid, you will see that DataGrid's columns width cannot adjust to the longest data in the field. This following procedure can fix the problem.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: