AutoGeneratingColumnEventArgs Class
Namespace: DevExpress.XamarinForms.DataGrid
Assembly: DevExpress.XamarinForms.Grid.dll
Declaration
public class AutoGeneratingColumnEventArgs :
CancelEventArgs
Examples
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;
}
See Also