System.Web.UI.WebControls.DataControlField.OnFieldChanged Method

Raises the FieldChanged event.

Syntax

protected virtual void OnFieldChanged ()

Remarks

The DataControlField.OnFieldChanged method raises an event signaling that the System.Web.UI.WebControls.DataControlField object's state has changed. Changes to the following properties cause this event to be raised: DataControlField.FooterText, DataControlField.HeaderImageUrl, DataControlField.HeaderText, DataControlField.ShowHeader, DataControlField.SortExpression, and DataControlField.Visible. Derived type properties also raise this event when state changes occur. Web server controls such as System.Web.UI.WebControls.DetailsView and System.Web.UI.WebControls.GridView typically call the DataBind method in response to a field change event.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The DataControlField.OnFieldChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0