Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ListEditor.NewObjectAdding Event

Occurs before a new object is created in a List Editor.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public event EventHandler<NewObjectAddingEventArgs> NewObjectAdding

#Event Data

The NewObjectAdding event's data class is DevExpress.ExpressApp.Editors.NewObjectAddingEventArgs.

#Remarks

This event occurs only in those List Editors whose controls support creation of new objects and supply the required event notification. For instance, the built-in GridListEditor supports this event because its XtraGrid control can display the new item row.

When deriving from the ListEditor class, raise this event before creating a new object in a List Editor’s control. In addition, the ListEditor.NewObjectCreated and ListEditor.NewObjectCanceled events should be raised where appropriate. In this instance, the NewObjectViewController will correctly create and manage a business object of the required type.

See Also