VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

AutoResize DataGrid

dietmar bos  (2 Submissions)   Databases/Data Access/DAO/ADO   Visual Basic 5.0   Beginner   Wed 3rd February 2021

The Code auto-resizes all columns of a DataGrid.
The longest string of a gridcolumn is the new width of the column. Similar to this ListView- or FlexGrid- feature.
I havn't found anything similar here, so I just want to put it in the codebase.

Inputs
2 parameters: a) pointer to the datagrid b) pointer to any form

Assumes
most tabular controls in VB have a functionality that aligns colums of those table to a 'rational' width, that makes good use of the visible space. Not so with the DataGrid control, which is a fine piece of software in all other regards. To fill this gap, this code here was written.

Returns
nothing

Side Effects
none that I know of

Rate AutoResize DataGrid (14(14 Vote))

Download AutoResize DataGrid

AutoResize DataGrid Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters