DataGrid.AutoGeneratedColumns Event

Definition

Occurs when auto generation of all columns is completed.

C#
public event EventHandler AutoGeneratedColumns;

Event Type

Remarks

If the AutoGenerateColumns property is set to true, the AutoGeneratingColumn event is raised for each column created. When all columns are created, this event will occur.

Note

The AutoGeneratedColumns event is raised every time the DataGrid attempts to generate columns. For example, AutoGeneratedColumns is raised when the DataGrid is initialized, AutoGenerateColumns is set to true, or the ItemsSource is changed, even if the ItemsSource is null.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10