MSDN Library

Visual Basic: DataGrid Control

AllowRowSizing Property Example

This example checks the database to see if it has any memo fields; if not, row resizing is disabled.

Sub CheckForMemoField()
   Dim Fld As Field
   DataGrid1.AllowRowSizing = False
   For Each Fld in Data1.Recordset.Fields
      If Fld.Type = dbMemo Then
         DataGrid1.AllowRowSizing = True
         DataGrid1.RowHeight = DataGrid1.RowHeight * 2
         Exit For
      End If
   Next
End Sub
Show:
© 2016 Microsoft