Skip to main content
Tab

ASPxListBox.ItemInserted Event

Occurs after a new list item has been added to the editor’s item collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public event ASPxDataInsertedEventHandler ItemInserted

Event Data

The ItemInserted event's data class is ASPxDataInsertedEventArgs. The following properties provide information specific to this event:

Property Description
AffectedRecords Gets the number of records affected by the update operation. Inherited from ASPxDataBaseUpdatedEventArgs.
Exception Gets the exception (if any) that was raised during the update operation. Inherited from ASPxDataBaseUpdatedEventArgs.
ExceptionHandled Gets or sets whether an exception raised during the update operation was handled in the event handler. Inherited from ASPxDataBaseUpdatedEventArgs.
NewValues Gets a dictionary that contains the values of the non-key field name/value pairs in the row to be inserted.

Remarks

New list items can be created within a list box editor by using the server (ListEditItemCollection.Add, ListEditItemCollection.Insert) or client (ASPxClientListBox.AddItem), ASPxClientListBox.InsertItem) methods.

The ItemInserted event serves as a notification that a new list item has been added to the editor’s ASPxListEdit.Items collection.

To specify whether a list item can be created, and cancel item creation, handle the ASPxListBox.ItemInserting event.

See Also