RadDataEntry
Represents a data entry control that automatically generates input controls based on data source properties. The RadDataEntry class is a wrapper for the RadDataEntryElement which contains the core functionality. This control supports automatic editor generation, validation, and flexible layout options for data-bound forms.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
public class RadDataEntry : RadScrollablePanel, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadScrollablePanelRadDataEntry...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadDataEntry class.
public RadDataEntry()
Properties
Gets or sets whether the RadDataEntry control is auto-sized.
[Browsable(false)]
public override bool AutoSize { get; set; }
true if auto-sizing is enabled; otherwise, false.
Overrides:
Gets or sets a value indicating whether labels of the editors should be automatically sized to align properly in columns according to the longest text.
[Browsable(true)]
public bool AutoSizeLabels { get; set; }
true if labels should be auto-sized for alignment; otherwise, false.
Gets or sets the number of columns that RadDataEntry will use to arrange generated controls.
[Browsable(true)]
public int ColumnCount { get; set; }
The number of columns. Must be at least 1.
Gets the current object from the data source at the current position.
[Browsable(false)]
public object CurrentObject { get; }
The current object, or null if no object is available at the current position.
Gets the instance of RadDataEntryElement wrapped by this control. RadDataEntryElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadDataEntry.
[Browsable(false)]
public RadDataEntryElement DataEntryElement { get; }
The RadDataEntryElement instance.
Gets or sets the data source for the RadDataEntry control.
[Browsable(true)]
public object DataSource { get; set; }
The data source object. Setting to null will clear all generated editors.
Gets the default size of the RadDataEntry control.
protected override Size DefaultSize { get; }
The default size of the control.
Overrides:
Gets or sets a value indicating whether the generated editors should automatically fit their width to the width of the RadDataEntry.
[Browsable(true)]
public bool FitToParentWidth { get; set; }
true if editors should fit to parent width; otherwise, false to use ItemDefaultSize.
Gets or sets the flow direction for generating editors when the ColumnCount property is greater than 1.
[Browsable(true)]
public FlowDirection FlowDirection { get; set; }
The flow direction that determines how controls are arranged across columns.
Gets or sets the default size that generated items should have when FitToParentWidth is false. When FitToParentWidth is true, the width is calculated based on the RadDataEntry width.
[Browsable(true)]
public Size ItemDefaultSize { get; set; }
The default size of generated editor items.
Gets or sets the spacing between the generated editor items.
[Browsable(true)]
public int ItemSpace { get; set; }
The item space in pixels.
Gets the BindingManagerBase manager that is used for the current data source.
[Browsable(false)]
public BindingManagerBase Manager { get; }
The binding manager instance.
Gets or sets a value indicating whether the validation panel should be visible.
[Browsable(false)]
public bool ShowValidationPanel { get; set; }
true if the validation panel should be shown; otherwise, false.
Gets the validation panel that displays validation messages and errors.
[Browsable(true)]
public ValidationPanel ValidationPanel { get; }
The ValidationPanel instance.
Methods
Creates a custom controls collection for managing data entry controls.
protected override Control.ControlCollection CreateControlsInstance()
A DataEntryPanelControlCollection instance.
Overrides:
Creates the main panel element that contains the data entry functionality.
protected override RadScrollablePanelElement CreatePanelElement()
A new RadDataEntryElement instance.
Overrides:
Creates a custom scrollable panel container for the data entry control.
protected override RadScrollablePanelContainer CreateScrollablePanelContainer()
A new DataEntryScrollablePanelContainer instance.
Overrides:
Releases unmanaged and optionally managed resources used by the RadDataEntry.
protected override void Dispose(bool disposing)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides:
Completes the initialization process and handles data source initialization if necessary.
public override void EndInit()
Overrides:
Initializes the internal controls including the validation panel.
protected override void InitializeInternalControls()
Overrides:
Inserts the internal controls including the validation panel into the control's collection.
protected override void InsertInternalControls()
Overrides:
Raises the BindingCreated event.
protected virtual void OnBindingCreated(object sender, BindingCreatedEventArgs e)
The sender of the event.
eBindingCreatedEventArgsThe BindingCreatedEventArgs instance containing the event data.
Raises the BindingCreating event.
protected virtual void OnBindingCreating(object sender, BindingCreatingEventArgs e)
The sender of the event.
eBindingCreatingEventArgsThe BindingCreatingEventArgs instance containing the event data.
Raises the EditorInitialized event.
protected virtual void OnEditorInitialized(object sender, EditorInitializedEventArgs e)
The sender of the event.
eEditorInitializedEventArgsThe EditorInitializedEventArgs instance containing the event data.
Raises the EditorInitializing event.
protected virtual void OnEditorInitializing(object sender, EditorInitializingEventArgs e)
The sender of the event.
eEditorInitializingEventArgsThe EditorInitializingEventArgs instance containing the event data.
Raises the ItemInitialized event.
protected virtual void OnItemInitialized(object sender, ItemInitializedEventArgs e)
The sender of the event.
eItemInitializedEventArgsThe ItemInitializedEventArgs instance containing the event data.
Raises the ItemInitializing event.
protected virtual void OnItemInitializing(object sender, ItemInitializingEventArgs e)
The sender of the event.
eItemInitializingEventArgsThe ItemInitializingEventArgs instance containing the event data.
Raises the ItemValidated event.
protected virtual void OnItemValidated(object sender, ItemValidatedEventArgs e)
The sender of the event.
eItemValidatedEventArgsThe ItemValidatedEventArgs instance containing the event data.
Raises the ItemValidating event.
protected virtual void OnItemValidating(object sender, ItemValidatingEventArgs e)
The sender of the event.
eItemValidatingEventArgsThe ItemValidatingEventArgs instance containing the event data.
Handles theme changes and applies special layout adjustments for Material themes.
protected override void OnThemeChanged()
Overrides:
Resets theme overrides for the BackColor property to restore default theme values.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets theme overrides for the ForeColor property to restore default theme values.
protected override void ResetForeColorThemeOverrides()
Overrides:
Scales the control by the specified factor for DPI scaling support.
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
The factor by which the control should be scaled.
specifiedBoundsSpecifiedA bitwise combination of the BoundsSpecified values specifying the bounds of the control to use when defining its size and position.
Overrides:
Sets theme overrides for the BackColor property to apply custom background colors.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets theme overrides for the ForeColor property to apply custom foreground colors.
protected override void SetForeColorThemeOverrides()
Overrides:
Updates the validation panel visibility based on the ShowValidationPanel property and whether there are any validation controls.
public virtual void UpdateValidationPanelVisibility()
Events
Occurs when a data binding has been successfully created for an editor control.
public event BindingCreatedEventHandler BindingCreated
Occurs when a data binding is being created for an editor control. This event can be cancelled to prevent binding creation.
public event BindingCreatingEventHandler BindingCreating
Occurs when an editor control has been successfully initialized.
public event EditorInitializedEventHandler EditorInitialized
Occurs when an editor control is being initialized. This event can be cancelled to prevent editor creation.
public event EditorInitializingEventHandler EditorInitializing
Occurs when a property item container has been successfully initialized.
public event ItemInitializedEventHandler ItemInitialized
Occurs when a property item container is being initialized. This event can be cancelled to prevent item creation.
public event ItemInitializingEventHandler ItemInitializing
Occurs when an editor item has been validated and validation has completed.
public event ItemValidatedEventHandler ItemValidated
Occurs when an editor item is being validated and validation rules are being checked.
public event ItemValidatingEventHandler ItemValidating