asp.net.ph

DetailsView.ItemUpdating Event

System.Web.UI.WebControls Namespace   DetailsView Class


.NET Framework version 2.0

Occurs when an Update command button within a DetailsView control is clicked, but before the update operation.

[ VB ]
Public Event ItemUpdating As DetailsViewUpdateEventHandler

[ C# ]
public event DetailsViewUpdateEventHandler ItemUpdating;

[ C++ ]
public: __event DetailsViewUpdateEventHandler* ItemUpdating;

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

Remarks

The ItemUpdating event is raised whenever an Update button associated with an item in the DetailsView control is clicked, but before the DetailsView control updates the record.

This allows you to provide an event-handling method that performs a custom routine, such as checking the values of a record before updating it in the data source, whenever this event occurs.

Event Data

Information related to the ItemUpdating event is passed via a DetailsViewUpdateEventArgs object to the method assigned to handle the event. The following DetailsViewUpdateEventArgs 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 )
CommandArgument Gets the command argument for the insert operation passed to the DetailsView control.
Keys Gets a dictionary that contains the key field name/value pairs for the record to update.
NewValues Gets a dictionary that contains the new field name/value pairs for the record to update.
OldValues Gets a dictionary that contains the original non-key field name/value pairs for the record to update.

See Also

DetailsView Members   Allowing Users to Edit Rows in a DetailsView Control 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