Skip to main content
Tab

ASPxListBox.ItemInserting Event

Enables you to prevent a list item from being added to the editor’s item collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public event ASPxDataInsertingEventHandler ItemInserting

Event Data

The ItemInserting event's data class is ASPxDataInsertingEventArgs. The following 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.
NewValues Gets a dictionary that contains the new field name/value pairs for the row to be inserted.

Remarks

New list items can be inserted into a list box editor’s ASPxListEdit.Items collection by using the server (ListEditItemCollection.Add, ListEditItemCollection.Insert) or client (ASPxClientListBox.AddItem, ASPxClientListBox.InsertItem) methods. Each time a new list item is going to be inserted to the ASPxListEdit.Items collection, the ItemInserting event occurs, allowing you to cancel item insertion. To cancel the insert operation, set the event parameter’s Cancel property to true.

After a list item has been inserted into the editor’s item collection, the ASPxListBox.ItemInserted event is raised.

See Also