ClassRadDataForm
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:
[TelerikToolboxCategory("Data")]
public class RadDataForm : Control, IDisposable
Inheritance: objectRadDataForm
Derived Classes:
Implements:
Constructors
RadDataForm()
Initializes a new instance of the RadDataForm class.
Declaration
public RadDataForm()
Fields
AutoCommitProperty
Represents the AutoCommit dependency property.
Declaration
public static readonly DependencyProperty AutoCommitProperty
Field Value
DependencyProperty
AutoEditProperty
Identifies the AutoEdit dependency property.
Declaration
public static readonly DependencyProperty AutoEditProperty
Field Value
DependencyProperty
AutoGenerateFieldsProperty
Represents the AutoGenerateFields dependency property.
Declaration
public static readonly DependencyProperty AutoGenerateFieldsProperty
Field Value
DependencyProperty
CanAddItemsProperty
Identifies the CanAddItems dependency property.
Declaration
public static readonly DependencyProperty CanAddItemsProperty
Field Value
DependencyProperty
The identifier for the CanAddItems dependency property.
CanBeginEditProperty
Identifies the CanBeginEdit dependency property.
Declaration
public static readonly DependencyProperty CanBeginEditProperty
Field Value
DependencyProperty
The identifier for the CanBeginEdit dependency property.
CanCancelEditProperty
Identifies the CanCancelEdit dependency property.
Declaration
public static readonly DependencyProperty CanCancelEditProperty
Field Value
DependencyProperty
The identifier for the CanCancelEdit dependency property.
CanCommitEditProperty
Identifies the CanCommitEdit dependency property.
Declaration
public static readonly DependencyProperty CanCommitEditProperty
Field Value
DependencyProperty
The identifier for the CanCommitEdit dependency property.
CanDeleteItemsProperty
Identifies the CanDeleteItems dependency property.
Declaration
public static readonly DependencyProperty CanDeleteItemsProperty
Field Value
DependencyProperty
The identifier for the CanDeleteItems dependency property.
CanMoveCurrentToFirstProperty
Identifies the CanMoveCurrentToFirst dependency property.
Declaration
public static readonly DependencyProperty CanMoveCurrentToFirstProperty
Field Value
DependencyProperty
The identifier for the CanMoveCurrentToFirst dependency property.
CanMoveCurrentToLastProperty
Identifies the CanMoveCurrentToLast dependency property.
Declaration
public static readonly DependencyProperty CanMoveCurrentToLastProperty
Field Value
DependencyProperty
The identifier for the CanMoveCurrentToLast dependency property.
CanMoveCurrentToNextProperty
Identifies the CanMoveCurrentToNext dependency property.
Declaration
public static readonly DependencyProperty CanMoveCurrentToNextProperty
Field Value
DependencyProperty
The identifier for the CanMoveCurrentToNext dependency property.
CanMoveCurrentToPositionProperty
Identifies the CanMoveCurrentToPosition dependency property.
Declaration
public static readonly DependencyProperty CanMoveCurrentToPositionProperty
Field Value
DependencyProperty
The identifier for the CanMoveCurrentToPosition dependency property.
CanMoveCurrentToPreviousProperty
Identifies the CanMoveCurrentToPrevious dependency property.
Declaration
public static readonly DependencyProperty CanMoveCurrentToPreviousProperty
Field Value
DependencyProperty
The identifier for the CanMoveCurrentToPrevious dependency property.
CancelButtonContentProperty
Represents the CancelButtonContent dependency property.
Declaration
public static readonly DependencyProperty CancelButtonContentProperty
Field Value
DependencyProperty
CancelButtonStyleProperty
Represents the CancelButtonStyle dependency property.
Declaration
public static readonly DependencyProperty CancelButtonStyleProperty
Field Value
DependencyProperty
CommandButtonsVisibilityProperty
Represents the CommandButtonsVisibility dependency property.
Declaration
public static readonly DependencyProperty CommandButtonsVisibilityProperty
Field Value
DependencyProperty
CommandProviderProperty
Represents the CommandProvider DependencyProperty.
Declaration
public static readonly DependencyProperty CommandProviderProperty
Field Value
DependencyProperty
CommitButtonContentProperty
Represents the CommitButtonContent dependency property.
Declaration
public static readonly DependencyProperty CommitButtonContentProperty
Field Value
DependencyProperty
CommitButtonStyleProperty
Represents the CommitButtonStyle dependency property.
Declaration
public static readonly DependencyProperty CommitButtonStyleProperty
Field Value
DependencyProperty
CurrentIndexProperty
Represents the CurrentIndex dependency property.
Declaration
public static readonly DependencyProperty CurrentIndexProperty
Field Value
DependencyProperty
CurrentItemProperty
Represents the CurrentItem property.
Declaration
public static readonly DependencyProperty CurrentItemProperty
Field Value
DependencyProperty
DataFieldStyleProperty
Represents the DataFieldStyle dependency property.
Declaration
public static readonly DependencyProperty DataFieldStyleProperty
Field Value
DependencyProperty
EditModeProperty
Represents the EditMode DependencyProperty.
Declaration
public static readonly DependencyProperty EditModeProperty
Field Value
DependencyProperty
EditTemplateProperty
Represents the EditTemplate dependency property.
Declaration
public static readonly DependencyProperty EditTemplateProperty
Field Value
DependencyProperty
EditTemplateSelectorProperty
Represents the EditTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty EditTemplateSelectorProperty
Field Value
DependencyProperty
EnablePropertyChangedBasedCancelProperty
Represents the EnablePropertyChangedBasedCancel DependencyProperty.
Declaration
public static readonly DependencyProperty EnablePropertyChangedBasedCancelProperty
Field Value
DependencyProperty
HeaderProperty
/Represents the Header property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
DependencyProperty
IsEmptyProperty
Identifies the IsEmpty dependency property.
Declaration
public static readonly DependencyProperty IsEmptyProperty
Field Value
DependencyProperty
The identifier for the IsEmpty dependency property.
IsItemChangedProperty
Identifies the IsItemChanged dependency property.
Declaration
public static readonly DependencyProperty IsItemChangedProperty
Field Value
DependencyProperty
The identifier for the IsItemChanged dependency property.
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
DependencyProperty
LabelPositionProperty
Represents the LabelPosition dependency property.
Declaration
public static readonly DependencyProperty LabelPositionProperty
Field Value
DependencyProperty
LabelStyleProperty
Represents the LabelStyle dependencyProperty.
Declaration
public static readonly DependencyProperty LabelStyleProperty
Field Value
DependencyProperty
ModeProperty
Identifies the Mode dependency property.
Declaration
public static readonly DependencyProperty ModeProperty
Field Value
DependencyProperty
The identifier for the Mode dependency property.
NewItemTemplateProperty
Represents the NewItemTemplate dependency property.
Declaration
public static readonly DependencyProperty NewItemTemplateProperty
Field Value
DependencyProperty
ReadOnlyTemplateProperty
Represents the ReadOnlyTemplate dependency property.
Declaration
public static readonly DependencyProperty ReadOnlyTemplateProperty
Field Value
DependencyProperty
ReadOnlyTemplateSelectorProperty
Represents the ReadOnlyTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty ReadOnlyTemplateSelectorProperty
Field Value
DependencyProperty
ValidationSummaryProperty
Represents the ValidationSummary property.
Declaration
public static readonly DependencyProperty ValidationSummaryProperty
Field Value
DependencyProperty
ValidationSummaryStyleProperty
Represents the ValidationSummaryStyleProperty.
Declaration
public static readonly DependencyProperty ValidationSummaryStyleProperty
Field Value
DependencyProperty
ValidationSummaryVisibilityProperty
Represents the ValidationSummaryVisibilityProperty.
Declaration
public static readonly DependencyProperty ValidationSummaryVisibilityProperty
Field Value
DependencyProperty
Properties
AutoCommit
Controls whether edited item will be committed on changing the current item.
AutoEdit
Gets or sets a value indicating whether DataForm should automatically enter edit mode.
AutoGenerateFields
Gets or sets a value indicating whether fields will be auto-generated.
CanAddItems
Gets a value that indicates whether the user can add items.
Declaration
public bool CanAddItems { get; }
Property Value
true if the user can add items; otherwise, false.
CanBeginEdit
Gets a value that indicates whether an edit of the current item can be started.
Declaration
public bool CanBeginEdit { get; }
Property Value
true if edit can be started; otherwise, false.
CanCancelEdit
Gets a value that indicates whether an edit of the current item can be canceled.
Declaration
public bool CanCancelEdit { get; }
Property Value
true if edit can be canceled; otherwise, false.
CanCommitEdit
Gets a value that indicates whether an edit of the current item can be committed.
Declaration
public bool CanCommitEdit { get; }
Property Value
true if edit can be committed; otherwise, false.
CanDeleteItems
Gets a value that indicates whether the user can Delete items.
Declaration
public bool CanDeleteItems { get; }
Property Value
true if the user can Delete items; otherwise, false.
CanMoveCurrentToFirst
Gets a value that indicates whether the user can move the current item to the first position.
Declaration
public bool CanMoveCurrentToFirst { get; }
Property Value
true if the user can move to the first position; otherwise, false.
CanMoveCurrentToLast
Gets a value that indicates whether the user can move the current item to the last position.
Declaration
public bool CanMoveCurrentToLast { get; }
Property Value
true if the user can move the current item to the last position; otherwise, false.
CanMoveCurrentToNext
Gets a value that indicates whether the user can move the current item to the next position.
Declaration
public bool CanMoveCurrentToNext { get; }
Property Value
true if the user can move the current item to the next position; otherwise, false.
CanMoveCurrentToPosition
Gets a value that indicates whether the user can move the current item to another position.
Declaration
public bool CanMoveCurrentToPosition { get; }
Property Value
true if the user can move to another position; otherwise, false.
CanMoveCurrentToPrevious
Gets a value that indicates whether the user can move the current item to the previous position.
Declaration
public bool CanMoveCurrentToPrevious { get; }
Property Value
true if the user can move the current to the previous position; otherwise, false.
CancelButtonContent
Gets or sets the content of the Cancel button.
CancelButtonStyle
The style for the Cancel button.
Declaration
public Style CancelButtonStyle { get; set; }
Property Value
Style
CommandButtonsVisibility
Gets or sets the command buttons visibility.
Declaration
public DataFormCommandButtonsVisibility? CommandButtonsVisibility { get; set; }
Property Value
CommandProvider
Exposes a DataFormCommandProvider.
Declaration
public ICommandProvider CommandProvider { get; set; }
Property Value
CommitButtonContent
Gets or sets the content of the Cancel button.
CommitButtonStyle
The style for the Commit button.
Declaration
public Style CommitButtonStyle { get; set; }
Property Value
Style
CurrentIndex
The index of the current item in the source collection.
CurrentItem
Gets or sets the current item.
DataFieldStyle
Gets or sets the style to be applied to data fields in data form.
Declaration
public Style DataFieldStyle { get; set; }
Property Value
Style
EditMode
Gets or sets the EditMode of this data form.
Declaration
public DataFormEditMode EditMode { get; set; }
Property Value
EditTemplate
Gets or sets the data template to be used in edit mode.
Declaration
public DataTemplate EditTemplate { get; set; }
Property Value
DataTemplate
EditTemplateSelector
Gets or sets the EditTemplateSelector.
Declaration
public DataTemplateSelector EditTemplateSelector { get; set; }
Property Value
DataTemplateSelector
The edit template selector.
EnablePropertyChangedBasedCancel
Gets or sets a value indicating whether PropertyChanged based cancelling logic is enabled.
Declaration
public bool EnablePropertyChangedBasedCancel { get; set; }
Property Value
true if PropertyChanged based cancel is enabled; otherwise, false.
Header
Gets or sets the content of the Header.
IsEmpty
Indicates whether the data form is empty.
IsItemChanged
Gets a value that indicates whether the current item was changed.
Declaration
public bool IsItemChanged { get; }
Property Value
true if the current item was changed; otherwise, false.
ItemsScrollViewer
Gets RadDataForm's root ScrollViewer element.
Declaration
protected virtual ScrollViewer ItemsScrollViewer { get; }
Property Value
ScrollViewer
ItemsSource
Gets or sets the items source.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
The items source.
LabelPosition
Gets or sets the position of labels in data fields in RadDataForm.
Declaration
public LabelPosition LabelPosition { get; set; }
Property Value
LabelStyle
Gets or sets the style for data field labels.
Declaration
public Style LabelStyle { get; set; }
Property Value
Style
Mode
Gets the current mode.
NewItemTemplate
Gets or sets the data template to be used when adding new item.
Declaration
public DataTemplate NewItemTemplate { get; set; }
Property Value
DataTemplate
ReadOnlyTemplate
Gets or sets the data template to be used in ReadOnly mode.
Declaration
public DataTemplate ReadOnlyTemplate { get; set; }
Property Value
DataTemplate
ReadOnlyTemplateSelector
Gets or sets the ReadOnlyTemplate selector.
Declaration
public DataTemplateSelector ReadOnlyTemplateSelector { get; set; }
Property Value
DataTemplateSelector
The read only template selector.
ValidationSummary
Gets the validation summary associated with this instance of RadDataForm.
Declaration
public DataFormValidationSummary ValidationSummary { get; }
Property Value
ValidationSummaryStyle
Gets or sets the style to be applied to the inner items control representing validation errors.
Declaration
public Style ValidationSummaryStyle { get; set; }
Property Value
Style
ValidationSummaryVisibility
Gets or sets the validation summary visibility.
Declaration
public Visibility ValidationSummaryVisibility { get; set; }
Property Value
Visibility
Methods
AcquireFocus()
RadDataForm tries to acquire the keyboard focus.
Declaration
public virtual void AcquireFocus()
BeginEdit()
Begins edit on the current item.
BeginEdit(DataFormDataField)
Begins edit on the specified data field of the current item. This method is useful when the EditMode is set to Single.
Declaration
public bool BeginEdit(DataFormDataField dataField)
Parameters
dataField
Returns
CancelEdit()
Cancels the edit on the current item.
CommitEdit()
Commits the edit of the current item and exits editing mode.
Declaration
public bool CommitEdit()
Returns
True if the commit succeeds; false otherwise.
CommitEdit(bool)
Commits the edit of the current item.
DeleteItem()
Deletes the current item.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources;
false to release only unmanaged resources.
GetValidationResults()
Gets the validation results for the current item.
Declaration
public virtual IEnumerable<ValidationResult> GetValidationResults()
Returns
MoveCurrentToFirst()
Moves the current item to the first position.
Declaration
public void MoveCurrentToFirst()
MoveCurrentToLast()
Moves the current item to the last position.
Declaration
public void MoveCurrentToLast()
MoveCurrentToNext()
Moves the current item to the next position.
Declaration
public void MoveCurrentToNext()
MoveCurrentToPosition(int)
Moves the current item to the specified position.
Declaration
public void MoveCurrentToPosition(int position)
Parameters
position
MoveCurrentToPrevious()
Declaration
public void MoveCurrentToPrevious()
OnAddedNewItem(AddedNewItemEventArgs)
Raises the AddedNewItem event.
Declaration
protected virtual void OnAddedNewItem(AddedNewItemEventArgs args)
Parameters
args
OnAddingNewItem(AddingNewItemEventArgs)
Raises the AddingNewItem event.
Declaration
protected virtual void OnAddingNewItem(AddingNewItemEventArgs e)
Parameters
e
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call .
Declaration
public override void OnApplyTemplate()
OnBeginningEdit(CancelEventArgs)
Raises the BeginningEdit event.
Declaration
protected virtual void OnBeginningEdit(CancelEventArgs e)
Parameters
e
OnCreateAutomationPeer()
Returns an automation peer for this RadDataForm.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnDataFieldBeginningEdit(DataFieldCancelEventArgs)
Raises the BeginningDataFieldEdit event.
Declaration
protected virtual void OnDataFieldBeginningEdit(DataFieldCancelEventArgs e)
Parameters
e
OnDataFieldEditEnded(DataFieldEditEndedEventArgs)
Raises the DataFieldEditEnded event.
Declaration
protected virtual void OnDataFieldEditEnded(DataFieldEditEndedEventArgs e)
Parameters
e
OnDataFieldPreparedEditor(DataFieldPreparedEditorEventArgs)
Raises the DataFieldPreparedEditor event.
Declaration
protected virtual void OnDataFieldPreparedEditor(DataFieldPreparedEditorEventArgs e)
Parameters
e
OnDataFieldValidated(DataFieldValidatedEventArgs)
Raises the DataFieldValidated event.
Declaration
protected virtual void OnDataFieldValidated(DataFieldValidatedEventArgs e)
Parameters
e
OnDataFieldValidating(DataFieldValidatingEventArgs)
Raises the DataFieldValidating event.
Declaration
protected virtual void OnDataFieldValidating(DataFieldValidatingEventArgs e)
Parameters
e
OnDeletedItem(ItemDeletedEventArgs)
Raises the DeletedItem event.
Declaration
protected virtual void OnDeletedItem(ItemDeletedEventArgs e)
Parameters
e
OnDeletingItem(CancelEventArgs)
Raises the DeletingItem event.
Declaration
protected virtual void OnDeletingItem(CancelEventArgs e)
Parameters
e
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnInitializingNewItem(InitializingNewItemEventArgs)
Raises the InitializingNewItem event.
Declaration
public virtual void OnInitializingNewItem(InitializingNewItemEventArgs e)
Parameters
e
The InitializingNewItemEventArgs instance containing the event data.
OnItemEditEnded(EditEndedEventArgs)
Raises the EditEnded event.
Declaration
protected virtual void OnItemEditEnded(EditEndedEventArgs e)
Parameters
e
OnItemEditEnding(EditEndingEventArgs)
Raises the EditEnding event.
Declaration
protected virtual void OnItemEditEnding(EditEndingEventArgs e)
Parameters
e
OnLoaded(object, RoutedEventArgs)
Called when the Loaded event occurs.
Declaration
public virtual void OnLoaded(object sender, RoutedEventArgs e)
Parameters
sender
The sender.
e
RoutedEventArgs
The RoutedEventArgs instance containing the event data.
OnMouseLeftButtonDown(MouseButtonEventArgs)
Called when the root ScrollViewer's MouseLeftButtonDown event is fired.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
e
MouseButtonEventArgs
OnUnloaded(object, RoutedEventArgs)
Called when the Unloaded event occurs.
Declaration
public virtual void OnUnloaded(object sender, RoutedEventArgs e)
Parameters
sender
The sender.
e
RoutedEventArgs
The RoutedEventArgs instance containing the event data.
OnValidatingItem(CancelEventArgs)
Raises the ValidatingItemEvent.
Declaration
protected virtual void OnValidatingItem(CancelEventArgs e)
Parameters
e
ValidateItem()
Checks if data current item is valid .
Events
AddedNewItem
Occurs when a new item was just added.
Declaration
public event EventHandler<AddedNewItemEventArgs> AddedNewItem
Event Value
AddingNewItem
Occurs when a new item is being added.
Declaration
public event EventHandler<AddingNewItemEventArgs> AddingNewItem
Event Value
AutoGeneratingField
Occurs when a data field is being generated.
Declaration
public event EventHandler<AutoGeneratingFieldEventArgs> AutoGeneratingField
Event Value
BeginningEdit
Occurs when an edit operation on the current item is beginning.
Declaration
public event EventHandler<CancelEventArgs> BeginningEdit
Event Value
CurrentItemChanged
Occurs when the current item has changed.
Declaration
public event EventHandler<EventArgs> CurrentItemChanged
Event Value
DataFieldBeginningEdit
Occurs when an edit operation on a data field is beginning.
Declaration
public event EventHandler<DataFieldCancelEventArgs> DataFieldBeginningEdit
Event Value
DataFieldEditEnded
Occurs when an edit operation on a data field has ended.
Declaration
public event EventHandler<DataFieldEditEndedEventArgs> DataFieldEditEnded
Event Value
DataFieldPreparedEditor
Occurs when an edit operation on a data field has begun.
Declaration
public event EventHandler<DataFieldPreparedEditorEventArgs> DataFieldPreparedEditor
Event Value
DataFieldValidated
Occurs when the value of a data field is validated.
Declaration
public event EventHandler<DataFieldValidatedEventArgs> DataFieldValidated
Event Value
DataFieldValidating
Occurs before the value of a data field is validated.
Declaration
public event EventHandler<DataFieldValidatingEventArgs> DataFieldValidating
Event Value
DeletedItem
Occurs after the current item was deleted.
Declaration
public event EventHandler<ItemDeletedEventArgs> DeletedItem
Event Value
DeletingItem
Occurs on deleting the current item.
Declaration
public event EventHandler<CancelEventArgs> DeletingItem
Event Value
EditEnded
Occurs after the current item was edited.
Declaration
public event EventHandler<EditEndedEventArgs> EditEnded
Event Value
EditEnding
Occurs when the edit of the current item is ending.
Declaration
public event EventHandler<EditEndingEventArgs> EditEnding
Event Value
InitializingNewItem
Occurs when a new item is being added.
Declaration
public event EventHandler<InitializingNewItemEventArgs> InitializingNewItem
Event Value
ValidatingItem
Occurs when the current item is being validated.
Declaration
public event EventHandler<CancelEventArgs> ValidatingItem
Event Value