This example uses the DataControlBase.AutoGenerateColumns property to populate the grid with columns from its data source.
The image below demonstrates the difference between generation modes (AddNew, KeepOld, and RemoveOld). Manually defined columns are highlighted in light yellow; automatically generated columns do not have a background color.
- Window1.xaml (VB: Window1.xaml)
- Window1.xaml.cs (VB: Window1.xaml.vb)
- SimpleData.cs (VB: SimpleData.vb)