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