mobilecontrols-devexpress-dot-xamarinforms-dot-datagrid-b766f8a2.md
Provides data for the DataGridView.AutoGeneratingColumn event.
Namespace : DevExpress.XamarinForms.DataGrid
Assembly : DevExpress.XamarinForms.Grid.dll
NuGet Package : DevExpress.XamarinForms.Grid
public class AutoGeneratingColumnEventArgs :
CancelEventArgs
AutoGeneratingColumnEventArgs is the data class for the following events:
The AutoGeneratingColumnEventArgs objects are automatically created, initialized and passed to the DataGridView.AutoGeneratingColumn event handlers.
This example shows how to use the AutoGeneratingColumn event to modify an auto-generated column at the time it is created, or cancel the generation of a column.
<dxg:DataGridView x:Name="grid" ItemsSource="{Binding Employees}"
AutoGenerateColumnsMode="Auto"
AutoGeneratingColumn="Grid_AutoGeneratingColumn">
<!-- ... -->
</dxg:DataGridView>
using DevExpress.XamarinForms.DataGrid;
// ...
private void Grid_AutoGeneratingColumn(object sender, AutoGeneratingColumnEventArgs e) {
if (e.Column.FieldName == "Access")
e.Column.Caption = "Access Level";
if (e.Column.FieldName == "Photo")
e.Cancel = true;
}
Object EventArgs CancelEventArgs AutoGeneratingColumnEventArgs
See Also