asp.net.ph

DetailsView.ModeChanging Event

System.Web.UI.WebControls Namespace   DetailsView Class


.NET Framework version 2.0

Occurs when the DetailsView control switches between edit, insert, and read-only mode, but before the mode changes.

[ VB ]
Public Event ModeChanging As DetailsViewModeEventHandler

[ C# ]
public event DetailsViewModeEventHandler ModeChanging;

[ C++ ]
public: __event DetailsViewModeEventHandler* ModeChanging;

In [ JScript ], you can handle the events defined by a class, but you cannot define your own.

Remarks

The ModeChanging event is raised whenever the DetailsView control switches between edit, insert, and read-only mode, but before the mode actually changes.

This allows you to provide an event-handling method that performs a custom routine, such as configuring the DetailsView control for a specific mode or canceling the mode change, whenever this event occurs.

Event Data

The method assigned to handle the event is passed an argument of type DetailsViewModeEventArgs object containing data related to this event. The following DetailsViewModeEventArgs properties provide information specific to this event.

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled ( Inherited from CancelEventArgs )
CancelingEdit Gets a value indicating whether the ModeChanging event was raised as a result of the user canceling an edit operation.
NewMode Gets or sets the mode to which the DetailsView control is changing.

See Also

DetailsView Members   DetailsViewModeEventArgs   DetailsViewModeEventHandler Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph