This topic will describe the various events exposed by RadDataForm.
AutoGeneratingField: Occurs when a data field is being generated. The AutoGeneratingFieldEventArgs of the handler have the following properties:
- DataField: The field about to be generated.
- Order: The display order of the new field in RadDataForm.
- PropertyName: The name of the property for which a field is being generated.
- PropertyType: The type of the property for which a field is being generated.
- Cancel: Setting this to True will cancel the generation of this field.
CurrentItemChanged: Occurs when the current item of the control has changed.
AddingNewItem: Occurs when a new item is being added. You can use this to cancel the process of adding a new item when a specific condition is met.
InitializingNewItem: Occurs when a new item is being added but after the AddingNewItem event. You can use this to set initial values for the initialized objects by passing an instance to the InitializingNewItemEventArgs' DataItem property.
AddedNewItem: Occurs when a new item was just added.
BeginningEdit: Occurs when an edit operation on the current item is beginning. You can use this to cancel the process of editing an item when a specific condition is met.
ValidatingItem: Occurs when the current item is being validated.
EditEnding: Occurs when the edit of the current item is ending. The EditAction property of the EditEndedEventArgs is of type EditAction and has a value either Commit or Cancel. You can use this to handle your custom logic.
EditEnded: Occurs after the current item was edited. Similarly to the EditEnding event, you can get ahold of the EditAction and use it accordingly.
DeletingItem: Occurs on deleting the current item. You can use this to cancel the process of deleting an item when a specific condition is met.
DeletedItem: Occurs after the current item was deleted. Through the ItemDeletedEventArgs you can get ahold of the DeletedItem which will hold the removed item.