Visual Basic: DataGrid Control

AllowSizing Property Example

This example prevents the user from resizing or editing the first three columns of the grid.

Private Sub Form_Load ()
   Dim I
   For I = 0 to 2
      DataGrid1.Columns(I).AllowSizing = False
      DataGrid1.Columns(I).Locked = True
   Next I
End Sub
Show: