# Add, Edit and Delete Operations

This article explains when the add, edit and remove operations of **RadDataForm** are available. We will cover the operations in the following order:

* [Add](https://www.telerik.com/products/wpf/documentation/controls/raddataform/features/add-edit-delete-buttons#add)
* [Remove](https://www.telerik.com/products/wpf/documentation/controls/raddataform/features/add-edit-delete-buttons#remove)
* [Edit](https://www.telerik.com/products/wpf/documentation/controls/raddataform/features/add-edit-delete-buttons#edit)

## Overview

To better understand how these operations work, we need to first examine how **RadDataForm's** source collection is set. **RadDataForm’s** Source property accepts **IEnumerable** values and manages them as follows:

* If the underlying value implements **IEditableCollectionView**, the current implementation of its methods is used.
* Otherwise, a new instance of Telerik’s **QueryableCollectionView** (which implements both aforementioned interfaces) is initialized, using the Source value as its source collection.

## Add

**RadDataForm's** Add operation will be available when one of the following conditions is met:

* The collection implements the **IEditableCollectionView** interface

* The collection is an **IList** without a fixed size and with a public default constructor

* The collection implements an **Add** method and has a public default constructor. The Add method needs to have a single parameter - the object you want to add to your collection.

In any other case, **RadDataForm** will not be able to add an item and the respective **Add** button will be disabled.

> caption RadDataForm with disabled add and remove buttons

![raddataform-crud-operations-1](https://www.telerik.com/products/wpf/documentation/assets/a1efeaafff26ad25663c69d19f181dd4/raddataform-crud-operations-1.png)

## Remove

Similar to the Add operation, you will be able to remove items in any of the following cases:

* The collection implements the **IEditableCollectionView** interface

* The collection is an **IList** without a fixed size

* The collection implements a **Remove** method with a single parameter - the object to remove from the collection.

> caption RadDataForm with enabled add and remove buttons

![raddataform-crud-operations-2](https://www.telerik.com/products/wpf/documentation/assets/8f18d25c3d7c36a76c851a4338f58653/raddataform-crud-operations-2.png)

## Edit

If the current item is not null and **RadDataForm** is not in editing mode, the **Edit** button will be enabled and editing functionality will be available.

If the items of the data source implement the **IEditableObject** or the **INotifyPropertyChanged** interface, you will be able to revert any pending changes with the **Cancel** button.

> Note that in the latter case, the **EnablePropertyChangedBasedCancel** property of **RadDataForm** needs to be set to **True**.

> **EnablePropertyChangedBasedCancel** is not supported when using custom data templates.

Please note that when an Edit is started, the Navigation and AddNew commands get disabled until the editing operation is committed or cancelled.

> For more information on the behaviour of the **OK** and **Cancel** buttons, you could check the article on [AutoCommit Settings](https://www.telerik.com/products/wpf/documentation/controls/raddataform/features/auto-commit).

**RadDataForm** supports editing of types that do not implement the **IEditableObject** or **INotifyPropertyChanged** interfaces. Still, please note that in this case you cannot take advantage of the cancel edit feature and the **Cancel** button will not be enabled.

> tip You can find a detailed explanation of how to implement the **IEditableObject** in this [MSDN article](http://msdn.microsoft.com/en-us/library/system.componentmodel.ieditableobject.aspx).

### AutoEdit

The **AutoEdit** property indicates whether **RadDataForm** should automatically enter Edit mode when loading or navigating items. The default value is **False**. If you need to have **RadDataForm** in Edit mode by default, instead of having to click the Edit button every time you need to edit a record, you can set **AutoEdit** to **True**.

> Please note that setting **AutoEdit** to **True** will disable the **Add** button and you won't be able to add new entries.

## See Also

* [AutoCommit Settings](https://www.telerik.com/products/wpf/documentation/controls/raddataform/features/auto-commit)
