.NET Framework Class Library for Silverlight
DataGrid..::.AutoGeneratingColumn Event

Occurs one time for each public, non-static property in the bound data type when the ItemsSource property is changed and the AutoGenerateColumns property is true.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)
Syntax

Visual Basic (Declaration)
Public Event AutoGeneratingColumn As EventHandler(Of DataGridAutoGeneratingColumnEventArgs)
Visual Basic (Usage)
Dim instance As DataGrid
Dim handler As EventHandler(Of DataGridAutoGeneratingColumnEventArgs)

AddHandler instance.AutoGeneratingColumn, handler
C#
public event EventHandler<DataGridAutoGeneratingColumnEventArgs> AutoGeneratingColumn
XAML Attribute Usage
<data:DataGrid AutoGeneratingColumn="eventhandler"/>

XAML Values

data:

A prefix that is defined to map the XML namespace for the System.Windows.Controls.Data assembly and the System.Windows.Controls CLR namespace.

Remarks

This event gives you the option of altering each generated column before it is added to the control. Additionally, you have the option of canceling the event to prevent specific columns from being added.

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources

Tags :


Page view tracker