Syncfusion.SfDataGrid.XForms Namespace > SfDataGrid Class : AutoGenerateColumnsMode Property

AutoGenerateColumnsMode Property

Gets or sets the AutoGenerateColumnsMode of SfDataGrid control. To generate the columns automatically based on the underlying collection the user must set the AutoGenerateColumns as true. SfDataGrid decides columns generation based on the AutoGenerateColumnsMode property.
public AutoGenerateColumnsMode AutoGenerateColumnsMode {get; set;}

Property Value

The AutoGenerateColumnsMode of SfDataGrid. The default value is AutoGenerateColumnsMode.Reset.
When columns are generated automatically by setting SfDataGrid.AutoGenerateColumns = true, the user can set the mode in which the columns should be generated by using the AutoGenerateColumnsMode property. The user can also customize the automatically generated column by using the AutoGeneratingColumn event. In order to include only the columns defined manually in the Columns collection, the user must set the AutoGenerateColumnsMode as AutoGenerateColumnsMode.None.
dataGrid.AutoGenerateColumnsMode = AutoGenerateColumnsMode.None;

Syncfusion.SfDataGrid.XForms: 17.2451.0.34

See Also