asp.net.ph

DetailsView.ItemInserting Event

System.Web.UI.WebControls Namespace   DetailsView Class


.NET Framework version 2.0

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

[ VB ]
Public Event ItemInserting As DetailsViewInsertEventHandler

[ C# ]
public event DetailsViewInsertEventHandler ItemInserting;

[ C++ ]
public: __event DetailsViewInsertEventHandler* ItemInserting;

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

Remarks

The ItemInserting event is raised whenever an Insert button associated with an item in the DetailsView control is clicked, but before the DetailsView control inserts 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 inserting it in the data source, whenever this event occurs.

Event Data

Information related to the ItemInserting event is passed via a DetailsViewInsertEventArgs object to the method assigned to handle the event. The following DetailsViewInsertEventArgs 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.
Values Gets a dictionary that contains the field name/value pairs for the record to insert.

See Also

DetailsView Members   Allowing Users to Add 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