DataGrid.LoadingRow Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Occurs after a DataGridRow is instantiated, so that you can customize it before it is used.

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

Syntax

'Declaration
Public Event LoadingRow As EventHandler(Of DataGridRowEventArgs)
public event EventHandler<DataGridRowEventArgs> LoadingRow
<sdk:DataGrid LoadingRow="eventhandler"/>

Remarks

To improve performance, the DataGrid control does not instantiate a DataGridRow object for each data item in the bound data source. Instead, the data grid creates DataGridRow objects only when they are needed, and reuses them as much as possible. For example, the data grid creates a DataGridRow object for each data item that is currently in view and recycles the row when it scrolls out of view.

This event enables you to make any necessary changes to a new row before it can be used. To undo these customizations before a row is reused, handle the UnloadingRow event.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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