Visual Basic: DataGrid Control
The Splits collection contains all stored Split objects in a DataGrid control.
You can create splits at design time using the grid's UI-active context menu. At run time, you can create and remove splits using the Splits collection's Add and Remove methods. Each method takes a zero-based split index. The following code demonstrates adding and removing splits at run time:
' Create a Split object with index 0 DataGrid1.Splits.Add 0 ' Remove the Split object with index 1 DataGrid1.Splits.Remove 1
You can determine the number of splits in a grid using the Splits collection's Count property.