Adjust DataGrids Column Width Based on Longest Field in Underlying Source
Version Compatibility: Visual Basic 6
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.