New to Telerik UI for WPFStart a free 30-day trial

Provides UI and logic for displaying and editing data in a from layout.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Data.dll

Syntax:

C#
[TelerikToolboxCategory("Data")]
public class RadDataForm : Control, IDisposable

Inheritance: objectRadDataForm

Derived Classes: CardViewDataForm

Implements: IDisposable

Constructors

Initializes a new instance of the RadDataForm class.

C#
public RadDataForm()

Fields

AutoCommitProperty

DependencyProperty

Represents the AutoCommit dependency property.

C#
public static readonly DependencyProperty AutoCommitProperty

AutoEditProperty

DependencyProperty

Identifies the AutoEdit dependency property.

C#
public static readonly DependencyProperty AutoEditProperty

AutoGenerateFieldsProperty

DependencyProperty

Represents the AutoGenerateFields dependency property.

C#
public static readonly DependencyProperty AutoGenerateFieldsProperty

CanAddItemsProperty

DependencyProperty

Identifies the CanAddItems dependency property.

C#
public static readonly DependencyProperty CanAddItemsProperty
Field Value:

The identifier for the CanAddItems dependency property.

CanBeginEditProperty

DependencyProperty

Identifies the CanBeginEdit dependency property.

C#
public static readonly DependencyProperty CanBeginEditProperty
Field Value:

The identifier for the CanBeginEdit dependency property.

CanCancelEditProperty

DependencyProperty

Identifies the CanCancelEdit dependency property.

C#
public static readonly DependencyProperty CanCancelEditProperty
Field Value:

The identifier for the CanCancelEdit dependency property.

CancelButtonContentProperty

DependencyProperty

Represents the CancelButtonContent dependency property.

C#
public static readonly DependencyProperty CancelButtonContentProperty

CancelButtonStyleProperty

DependencyProperty

Represents the CancelButtonStyle dependency property.

C#
public static readonly DependencyProperty CancelButtonStyleProperty

CanCommitEditProperty

DependencyProperty

Identifies the CanCommitEdit dependency property.

C#
public static readonly DependencyProperty CanCommitEditProperty
Field Value:

The identifier for the CanCommitEdit dependency property.

CanDeleteItemsProperty

DependencyProperty

Identifies the CanDeleteItems dependency property.

C#
public static readonly DependencyProperty CanDeleteItemsProperty
Field Value:

The identifier for the CanDeleteItems dependency property.

Identifies the CanMoveCurrentToFirst dependency property.

C#
public static readonly DependencyProperty CanMoveCurrentToFirstProperty
Field Value:

The identifier for the CanMoveCurrentToFirst dependency property.

Identifies the CanMoveCurrentToLast dependency property.

C#
public static readonly DependencyProperty CanMoveCurrentToLastProperty
Field Value:

The identifier for the CanMoveCurrentToLast dependency property.

Identifies the CanMoveCurrentToNext dependency property.

C#
public static readonly DependencyProperty CanMoveCurrentToNextProperty
Field Value:

The identifier for the CanMoveCurrentToNext dependency property.

Identifies the CanMoveCurrentToPosition dependency property.

C#
public static readonly DependencyProperty CanMoveCurrentToPositionProperty
Field Value:

The identifier for the CanMoveCurrentToPosition dependency property.

Identifies the CanMoveCurrentToPrevious dependency property.

C#
public static readonly DependencyProperty CanMoveCurrentToPreviousProperty
Field Value:

The identifier for the CanMoveCurrentToPrevious dependency property.

Represents the CommandButtonsVisibility dependency property.

C#
public static readonly DependencyProperty CommandButtonsVisibilityProperty

CommandProviderProperty

DependencyProperty

Represents the CommandProvider DependencyProperty.

C#
public static readonly DependencyProperty CommandProviderProperty

CommitButtonContentProperty

DependencyProperty

Represents the CommitButtonContent dependency property.

C#
public static readonly DependencyProperty CommitButtonContentProperty

CommitButtonStyleProperty

DependencyProperty

Represents the CommitButtonStyle dependency property.

C#
public static readonly DependencyProperty CommitButtonStyleProperty

CurrentIndexProperty

DependencyProperty

Represents the CurrentIndex dependency property.

C#
public static readonly DependencyProperty CurrentIndexProperty

CurrentItemProperty

DependencyProperty

Represents the CurrentItem property.

C#
public static readonly DependencyProperty CurrentItemProperty

DataFieldStyleProperty

DependencyProperty

Represents the DataFieldStyle dependency property.

C#
public static readonly DependencyProperty DataFieldStyleProperty

EditModeProperty

DependencyProperty

Represents the EditMode DependencyProperty.

C#
public static readonly DependencyProperty EditModeProperty

EditTemplateProperty

DependencyProperty

Represents the EditTemplate dependency property.

C#
public static readonly DependencyProperty EditTemplateProperty

Represents the EditTemplateSelector dependency property.

C#
public static readonly DependencyProperty EditTemplateSelectorProperty

Represents the EnablePropertyChangedBasedCancel DependencyProperty.

C#
public static readonly DependencyProperty EnablePropertyChangedBasedCancelProperty

HeaderProperty

DependencyProperty

/Represents the Header property.

C#
public static readonly DependencyProperty HeaderProperty

IsEmptyProperty

DependencyProperty

Identifies the IsEmpty dependency property.

C#
public static readonly DependencyProperty IsEmptyProperty
Field Value:

The identifier for the IsEmpty dependency property.

IsItemChangedProperty

DependencyProperty

Identifies the IsItemChanged dependency property.

C#
public static readonly DependencyProperty IsItemChangedProperty
Field Value:

The identifier for the IsItemChanged dependency property.

ItemsSourceProperty

DependencyProperty

Identifies the ItemsSource dependency property.

C#
public static readonly DependencyProperty ItemsSourceProperty

LabelPositionProperty

DependencyProperty

Represents the LabelPosition dependency property.

C#
public static readonly DependencyProperty LabelPositionProperty

LabelStyleProperty

DependencyProperty

Represents the LabelStyle dependencyProperty.

C#
public static readonly DependencyProperty LabelStyleProperty

ModeProperty

DependencyProperty

Identifies the Mode dependency property.

C#
public static readonly DependencyProperty ModeProperty
Field Value:

The identifier for the Mode dependency property.

NewItemTemplateProperty

DependencyProperty

Represents the NewItemTemplate dependency property.

C#
public static readonly DependencyProperty NewItemTemplateProperty

ReadOnlyTemplateProperty

DependencyProperty

Represents the ReadOnlyTemplate dependency property.

C#
public static readonly DependencyProperty ReadOnlyTemplateProperty

Represents the ReadOnlyTemplateSelector dependency property.

C#
public static readonly DependencyProperty ReadOnlyTemplateSelectorProperty

ValidationSummaryProperty

DependencyProperty

Represents the ValidationSummary property.

C#
public static readonly DependencyProperty ValidationSummaryProperty

Represents the ValidationSummaryStyleProperty.

C#
public static readonly DependencyProperty ValidationSummaryStyleProperty

Represents the ValidationSummaryVisibilityProperty.

C#
public static readonly DependencyProperty ValidationSummaryVisibilityProperty

Properties

Controls whether edited item will be committed on changing the current item.

C#
public bool AutoCommit { get; set; }

Gets or sets a value indicating whether DataForm should automatically enter edit mode.

C#
public bool AutoEdit { get; set; }

Gets or sets a value indicating whether fields will be auto-generated.

C#
public bool AutoGenerateFields { get; set; }

Gets a value that indicates whether the user can add items.

C#
public bool CanAddItems { get; }
Property Value:

true if the user can add items; otherwise, false.

Gets a value that indicates whether an edit of the current item can be started.

C#
public bool CanBeginEdit { get; }
Property Value:

true if edit can be started; otherwise, false.

Gets a value that indicates whether an edit of the current item can be canceled.

C#
public bool CanCancelEdit { get; }
Property Value:

true if edit can be canceled; otherwise, false.

Gets or sets the content of the Cancel button.

C#
public object CancelButtonContent { get; set; }

The style for the Cancel button.

C#
public Style CancelButtonStyle { get; set; }

Gets a value that indicates whether an edit of the current item can be committed.

C#
public bool CanCommitEdit { get; }
Property Value:

true if edit can be committed; otherwise, false.

Gets a value that indicates whether the user can Delete items.

C#
public bool CanDeleteItems { get; }
Property Value:

true if the user can Delete items; otherwise, false.

Gets a value that indicates whether the user can move the current item to the first position.

C#
public bool CanMoveCurrentToFirst { get; }
Property Value:

true if the user can move to the first position; otherwise, false.

Gets a value that indicates whether the user can move the current item to the last position.

C#
public bool CanMoveCurrentToLast { get; }
Property Value:

true if the user can move the current item to the last position; otherwise, false.

Gets a value that indicates whether the user can move the current item to the next position.

C#
public bool CanMoveCurrentToNext { get; }
Property Value:

true if the user can move the current item to the next position; otherwise, false.

Gets a value that indicates whether the user can move the current item to another position.

C#
public bool CanMoveCurrentToPosition { get; }
Property Value:

true if the user can move to another position; otherwise, false.

Gets a value that indicates whether the user can move the current item to the previous position.

C#
public bool CanMoveCurrentToPrevious { get; }
Property Value:

true if the user can move the current to the previous position; otherwise, false.

Gets or sets the command buttons visibility.

C#
public DataFormCommandButtonsVisibility? CommandButtonsVisibility { get; set; }

Exposes a DataFormCommandProvider.

C#
public ICommandProvider CommandProvider { get; set; }

Gets or sets the content of the Cancel button.

C#
public object CommitButtonContent { get; set; }

The style for the Commit button.

C#
public Style CommitButtonStyle { get; set; }

The index of the current item in the source collection.

C#
public int CurrentIndex { get; set; }

Gets or sets the current item.

C#
public object CurrentItem { get; set; }

Gets or sets the style to be applied to data fields in data form.

C#
public Style DataFieldStyle { get; set; }

Gets or sets the EditMode of this data form.

C#
public DataFormEditMode EditMode { get; set; }

EditTemplate

DataTemplate

Gets or sets the data template to be used in edit mode.

C#
public DataTemplate EditTemplate { get; set; }

EditTemplateSelector

DataTemplateSelector

Gets or sets the EditTemplateSelector.

C#
public DataTemplateSelector EditTemplateSelector { get; set; }
Property Value:

The edit template selector.

Gets or sets a value indicating whether PropertyChanged based cancelling logic is enabled.

C#
public bool EnablePropertyChangedBasedCancel { get; set; }
Property Value:

true if PropertyChanged based cancel is enabled; otherwise, false.

Gets or sets the content of the Header.

C#
public object Header { get; set; }

Indicates whether the data form is empty.

C#
public bool IsEmpty { get; }

Gets a value that indicates whether the current item was changed.

C#
public bool IsItemChanged { get; }
Property Value:

true if the current item was changed; otherwise, false.

ItemsScrollViewer

ScrollViewer

Gets RadDataForm's root ScrollViewer element.

C#
protected virtual ScrollViewer ItemsScrollViewer { get; }

Gets or sets the items source.

C#
public IEnumerable ItemsSource { get; set; }
Property Value:

The items source.

Gets or sets the position of labels in data fields in RadDataForm.

C#
public LabelPosition LabelPosition { get; set; }

Gets or sets the style for data field labels.

C#
public Style LabelStyle { get; set; }

Gets the current mode.

C#
public RadDataFormMode Mode { get; }

NewItemTemplate

DataTemplate

Gets or sets the data template to be used when adding new item.

C#
public DataTemplate NewItemTemplate { get; set; }

ReadOnlyTemplate

DataTemplate

Gets or sets the data template to be used in ReadOnly mode.

C#
public DataTemplate ReadOnlyTemplate { get; set; }

ReadOnlyTemplateSelector

DataTemplateSelector

Gets or sets the ReadOnlyTemplate selector.

C#
public DataTemplateSelector ReadOnlyTemplateSelector { get; set; }
Property Value:

The read only template selector.

Gets the validation summary associated with this instance of RadDataForm.

C#
public DataFormValidationSummary ValidationSummary { get; }

Gets or sets the style to be applied to the inner items control representing validation errors.

C#
public Style ValidationSummaryStyle { get; set; }

Gets or sets the validation summary visibility.

C#
public Visibility ValidationSummaryVisibility { get; set; }

Methods

RadDataForm tries to acquire the keyboard focus.

C#
public virtual void AcquireFocus()

Adds a new item.

C#
public bool AddNewItem()
Returns:

bool

Begins edit on the current item.

C#
public bool BeginEdit()
Returns:

bool

Begins edit on the specified data field of the current item. This method is useful when the EditMode is set to Single.

C#
public bool BeginEdit(DataFormDataField dataField)
Parameters:dataFieldDataFormDataFieldReturns:

bool

Cancels the edit on the current item.

C#
public bool CancelEdit()
Returns:

bool

Commits the edit of the current item and exits editing mode.

C#
public bool CommitEdit()
Returns:

bool

True if the commit succeeds; false otherwise.

Commits the edit of the current item.

C#
public bool CommitEdit(bool exitEditMode)
Parameters:exitEditModebool

Whether or not editing mode should be exited after committing the edit.

Returns:

bool

True if the commit succeeds; false otherwise.

Deletes the current item.

C#
public bool DeleteItem()
Returns:

bool

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Releases unmanaged and - optionally - managed resources.

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Gets the validation results for the current item.

C#
public virtual IEnumerable<ValidationResult> GetValidationResults()
Returns:

IEnumerable<ValidationResult>

Moves the current item to the first position.

C#
public void MoveCurrentToFirst()

Moves the current item to the last position.

C#
public void MoveCurrentToLast()

Moves the current item to the next position.

C#
public void MoveCurrentToNext()

Moves the current item to the specified position.

C#
public void MoveCurrentToPosition(int position)
Parameters:positionint
C#
public void MoveCurrentToPrevious()

Raises the AddedNewItem event.

C#
protected virtual void OnAddedNewItem(AddedNewItemEventArgs args)
Parameters:argsAddedNewItemEventArgs

Raises the AddingNewItem event.

C#
protected virtual void OnAddingNewItem(AddingNewItemEventArgs e)
Parameters:eAddingNewItemEventArgs

When overridden in a derived class, is invoked whenever application code or internal processes call .

C#
public override void OnApplyTemplate()

Raises the BeginningEdit event.

C#
protected virtual void OnBeginningEdit(CancelEventArgs e)
Parameters:eCancelEventArgs

Returns an automation peer for this RadDataForm.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Raises the BeginningDataFieldEdit event.

C#
protected virtual void OnDataFieldBeginningEdit(DataFieldCancelEventArgs e)
Parameters:eDataFieldCancelEventArgs

Raises the DataFieldEditEnded event.

C#
protected virtual void OnDataFieldEditEnded(DataFieldEditEndedEventArgs e)
Parameters:eDataFieldEditEndedEventArgs

Raises the DataFieldPreparedEditor event.

C#
protected virtual void OnDataFieldPreparedEditor(DataFieldPreparedEditorEventArgs e)
Parameters:eDataFieldPreparedEditorEventArgs

Raises the DataFieldValidated event.

C#
protected virtual void OnDataFieldValidated(DataFieldValidatedEventArgs e)
Parameters:eDataFieldValidatedEventArgs

Raises the DataFieldValidating event.

C#
protected virtual void OnDataFieldValidating(DataFieldValidatingEventArgs e)
Parameters:eDataFieldValidatingEventArgs

Raises the DeletedItem event.

C#
protected virtual void OnDeletedItem(ItemDeletedEventArgs e)
Parameters:eItemDeletedEventArgs

Raises the DeletingItem event.

C#
protected virtual void OnDeletingItem(CancelEventArgs e)
Parameters:eCancelEventArgs

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Raises the InitializingNewItem event.

C#
public virtual void OnInitializingNewItem(InitializingNewItemEventArgs e)
Parameters:eInitializingNewItemEventArgs

The InitializingNewItemEventArgs instance containing the event data.

Raises the EditEnded event.

C#
protected virtual void OnItemEditEnded(EditEndedEventArgs e)
Parameters:eEditEndedEventArgs

Raises the EditEnding event.

C#
protected virtual void OnItemEditEnding(EditEndingEventArgs e)
Parameters:eEditEndingEventArgs

Called when the Loaded event occurs.

C#
public virtual void OnLoaded(object sender, RoutedEventArgs e)
Parameters:senderobject

The sender.

eRoutedEventArgs

The RoutedEventArgs instance containing the event data.

Called when the root ScrollViewer's MouseLeftButtonDown event is fired.

C#
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

Called when the Unloaded event occurs.

C#
public virtual void OnUnloaded(object sender, RoutedEventArgs e)
Parameters:senderobject

The sender.

eRoutedEventArgs

The RoutedEventArgs instance containing the event data.

Raises the ValidatingItemEvent.

C#
protected virtual void OnValidatingItem(CancelEventArgs e)
Parameters:eCancelEventArgs

Resets the theme.

C#
public void ResetTheme()

Checks if data current item is valid .

C#
public bool ValidateItem()
Returns:

bool

Events

Occurs when a new item was just added.

C#
public event EventHandler<AddedNewItemEventArgs> AddedNewItem

Occurs when a new item is being added.

C#
public event EventHandler<AddingNewItemEventArgs> AddingNewItem

Occurs when a data field is being generated.

C#
public event EventHandler<AutoGeneratingFieldEventArgs> AutoGeneratingField

Occurs when an edit operation on the current item is beginning.

C#
public event EventHandler<CancelEventArgs> BeginningEdit

Occurs when the current item has changed.

C#
public event EventHandler<EventArgs> CurrentItemChanged

Occurs when an edit operation on a data field is beginning.

C#
public event EventHandler<DataFieldCancelEventArgs> DataFieldBeginningEdit

Occurs when an edit operation on a data field has ended.

C#
public event EventHandler<DataFieldEditEndedEventArgs> DataFieldEditEnded

Occurs when an edit operation on a data field has begun.

C#
public event EventHandler<DataFieldPreparedEditorEventArgs> DataFieldPreparedEditor

Occurs when the value of a data field is validated.

C#
public event EventHandler<DataFieldValidatedEventArgs> DataFieldValidated

Occurs before the value of a data field is validated.

C#
public event EventHandler<DataFieldValidatingEventArgs> DataFieldValidating

Occurs after the current item was deleted.

C#
public event EventHandler<ItemDeletedEventArgs> DeletedItem

Occurs on deleting the current item.

C#
public event EventHandler<CancelEventArgs> DeletingItem

Occurs after the current item was edited.

C#
public event EventHandler<EditEndedEventArgs> EditEnded

Occurs when the edit of the current item is ending.

C#
public event EventHandler<EditEndingEventArgs> EditEnding

Occurs when a new item is being added.

C#
public event EventHandler<InitializingNewItemEventArgs> InitializingNewItem

Occurs when the current item is being validated.

C#
public event EventHandler<CancelEventArgs> ValidatingItem
In this article
DefinitionConstructorsRadDataForm()FieldsAutoCommitPropertyAutoEditPropertyAutoGenerateFieldsPropertyCanAddItemsPropertyCanBeginEditPropertyCanCancelEditPropertyCancelButtonContentPropertyCancelButtonStylePropertyCanCommitEditPropertyCanDeleteItemsPropertyCanMoveCurrentToFirstPropertyCanMoveCurrentToLastPropertyCanMoveCurrentToNextPropertyCanMoveCurrentToPositionPropertyCanMoveCurrentToPreviousPropertyCommandButtonsVisibilityPropertyCommandProviderPropertyCommitButtonContentPropertyCommitButtonStylePropertyCurrentIndexPropertyCurrentItemPropertyDataFieldStylePropertyEditModePropertyEditTemplatePropertyEditTemplateSelectorPropertyEnablePropertyChangedBasedCancelPropertyHeaderPropertyIsEmptyPropertyIsItemChangedPropertyItemsSourcePropertyLabelPositionPropertyLabelStylePropertyModePropertyNewItemTemplatePropertyReadOnlyTemplatePropertyReadOnlyTemplateSelectorPropertyValidationSummaryPropertyValidationSummaryStylePropertyValidationSummaryVisibilityPropertyPropertiesAutoCommitAutoEditAutoGenerateFieldsCanAddItemsCanBeginEditCanCancelEditCancelButtonContentCancelButtonStyleCanCommitEditCanDeleteItemsCanMoveCurrentToFirstCanMoveCurrentToLastCanMoveCurrentToNextCanMoveCurrentToPositionCanMoveCurrentToPreviousCommandButtonsVisibilityCommandProviderCommitButtonContentCommitButtonStyleCurrentIndexCurrentItemDataFieldStyleEditModeEditTemplateEditTemplateSelectorEnablePropertyChangedBasedCancelHeaderIsEmptyIsItemChangedItemsScrollViewerItemsSourceLabelPositionLabelStyleModeNewItemTemplateReadOnlyTemplateReadOnlyTemplateSelectorValidationSummaryValidationSummaryStyleValidationSummaryVisibilityMethodsAcquireFocus()AddNewItem()BeginEdit()BeginEdit(DataFormDataField)CancelEdit()CommitEdit()CommitEdit(bool)DeleteItem()Dispose()Dispose(bool)GetValidationResults()MoveCurrentToFirst()MoveCurrentToLast()MoveCurrentToNext()MoveCurrentToPosition(int)MoveCurrentToPrevious()OnAddedNewItem(AddedNewItemEventArgs)OnAddingNewItem(AddingNewItemEventArgs)OnApplyTemplate()OnBeginningEdit(CancelEventArgs)OnCreateAutomationPeer()OnDataFieldBeginningEdit(DataFieldCancelEventArgs)OnDataFieldEditEnded(DataFieldEditEndedEventArgs)OnDataFieldPreparedEditor(DataFieldPreparedEditorEventArgs)OnDataFieldValidated(DataFieldValidatedEventArgs)OnDataFieldValidating(DataFieldValidatingEventArgs)OnDeletedItem(ItemDeletedEventArgs)OnDeletingItem(CancelEventArgs)OnInitialized(EventArgs)OnInitializingNewItem(InitializingNewItemEventArgs)OnItemEditEnded(EditEndedEventArgs)OnItemEditEnding(EditEndingEventArgs)OnLoaded(object, RoutedEventArgs)OnMouseLeftButtonDown(MouseButtonEventArgs)OnUnloaded(object, RoutedEventArgs)OnValidatingItem(CancelEventArgs)ResetTheme()ValidateItem()EventsAddedNewItemAddingNewItemAutoGeneratingFieldBeginningEditCurrentItemChangedDataFieldBeginningEditDataFieldEditEndedDataFieldPreparedEditorDataFieldValidatedDataFieldValidatingDeletedItemDeletingItemEditEndedEditEndingInitializingNewItemValidatingItem
Not finding the help you need?
Contact Support