AutoCreateColumns Property
See Also 
Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridControl Class : AutoCreateColumns Property

Gets or sets a value indicating whether columns should automatically be created when the grid is bound to an ItemsSource.

Syntax

Visual Basic (Declaration) 
Public Property AutoCreateColumns As Boolean
C# 
public bool AutoCreateColumns {get; set;}

Return Value

true if columns should automatically be created when the grid is bound to an items source; false if columns are to be created manually. By default, true.

Remarks

When binding a grid to a DataGridCollectionView or DataGridCollectionViewSource (in XAML), it is recommended to use the ItemProperties property to add or remove the columns the will end up in the Columns collection and leave the AutoCreateColumns property to true.

Notes

Cell editors need to be explicitly provided for each column in order to support insertion when AutoCreateColumns is set to false (see Column.CellEditor property).

Requirements

Supported Frameworks: Microsoft .NET Framework version 3.5

See Also