RadDataLayout
An extension of the RadLayoutControl which adds data binding functionality. When set with a DataSource, RadDataLayout automatically generates editors for each of the fields in the datasource. Provides validation functionality and additional interface for displaying validation messages.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
[Docking(DockingBehavior.Ask)]
public class RadDataLayout : RadNCEnabledControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadNonClientUIControlRadNCEnabledControlRadDataLayout...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadDataLayout class.
public RadDataLayout()
Properties
If [true], the labels will have a fixed size, best-fitted to the largest text in the column. If [false], the labels will have their default proportional size.
[Browsable(true)]
public bool AutoSizeLabels { get; set; }
Gets the margin around the client area of the control. In the default case, this should be the border thickness.
public Padding ClientMargin { get; }
Gets or sets the number of columns which will be used to arrange generated controls.
[Browsable(true)]
public int ColumnCount { get; set; }
Number Of Columns should be at least one
Gets the current object.
[Browsable(false)]
public object CurrentObject { get; }
Gets the instance of RadDataLayoutElement which is the main element in the hierarchy tree and encapsulates the actual functionality of RadDataLayout.
[Browsable(false)]
public RadDataLayoutElement DataLayoutElement { get; }
Gets or sets the DataSource. Setting the DataSource will auto-generate editors for the fields in it.
[Browsable(true)]
public object DataSource { get; set; }
Gets the default size of the RadDataLayout control.
protected override Size DefaultSize { get; }
Overrides:
Gets a value indicating whether non-client modification is enabled for this control.
protected override bool EnableNCModification { get; }
Overrides:
Gets a value indicating whether non-client painting is enabled for this control.
protected override bool EnableNCPainting { get; }
Overrides:
Gets or sets a value indicating the flow direction of generated editors when the ColumnCount property has value bigger than 1.
[Browsable(true)]
public FlowDirection FlowDirection { get; set; }
The ItemDefaultHeight property sets the height that generated items should have.
[Browsable(true)]
public int ItemDefaultHeight { get; set; }
Gets the inner RadLayoutControl.
[Browsable(true)]
public RadLayoutControl LayoutControl { get; }
Gets the BindingManagerBase manager that is used to manage the current DataSource.
[Browsable(false)]
public BindingManagerBase Manager { get; }
Gets or sets a value indicating whether the validation panel should appear.
[Browsable(false)]
public bool ShowValidationPanel { get; set; }
Gets the validation panel.
[Browsable(true)]
public ValidationPanel ValidationPanel { get; }
Methods
Creates child elements for the RadDataLayout control.
protected override void CreateChildItems(RadElement parent)
The parent element.
Overrides:
Releases the unmanaged resources used by the RadDataLayout and optionally releases the managed resources.
protected override void Dispose(bool disposing)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides:
Completes the initialization of the component and performs binding if necessary.
public override void EndInit()
Overrides:
Initializes the RadLayoutControl and the ValidationPanel
protected virtual void InitializeInternalControls()
Raises the BindingContextChanged event.
Fires the BindingCreated event.
protected virtual void OnBindingCreated(object sender, BindingCreatedEventArgs e)
The sender.
eBindingCreatedEventArgsThe BindingCreatedEventArgs instance containing the event data.
Fires the BindingCreating event.
protected virtual void OnBindingCreating(object sender, BindingCreatingEventArgs e)
The sender.
eBindingCreatingEventArgsThe BindingCreatingEventArgs instance containing the event data.
Fires the EditorInitialized event.
protected virtual void OnEditorInitialized(object sender, EditorInitializedEventArgs e)
The sender.
eEditorInitializedEventArgsThe EditorInitializedEventArgs instance containing the event data.
Fires the EditorInitializing event.
protected virtual void OnEditorInitializing(object sender, EditorInitializingEventArgs e)
The sender.
eEditorInitializingEventArgsThe EditorInitializingEventArgs instance containing the event data.
Fires the ItemInitialized event.
protected virtual void OnItemInitialized(object sender, DataLayoutItemInitializedEventArgs e)
The sender.
eDataLayoutItemInitializedEventArgsThe DataLayoutItemInitializedEventArgs instance containing the event data.
Fires the ItemInitializing event.
protected virtual void OnItemInitializing(object sender, DataLayoutItemInitializingEventArgs e)
The sender.
eDataLayoutItemInitializingEventArgsThe DataLayoutItemInitializingEventArgs instance containing the event data.
Fires the ItemValidated event.
protected virtual void OnItemValidated(object sender, DataLayoutItemValidatedEventArgs e)
The sender.
eDataLayoutItemValidatedEventArgsThe DataLayoutItemValidatedEventArgs instance containing the event data.
Fires the ItemValidating event.
protected virtual void OnItemValidating(object sender, DataLayoutItemValidatingEventArgs e)
The sender.
eDataLayoutItemValidatingEventArgsThe DataLayoutItemValidatingEventArgs instance containing the event data.
Raises the SizeChanged event and invalidates the non-client area.
Raises the ThemeChanged event and updates theme-related properties.
protected override void OnThemeChanged()
Overrides:
Resets the background color theme overrides for this control and its internal layout control.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets the foreground color theme overrides for this control and its internal layout control.
protected override void ResetForeColorThemeOverrides()
Overrides:
Sets the background color theme overrides for this control and its internal layout control.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets the foreground color theme overrides for this control and its internal layout control.
protected override void SetForeColorThemeOverrides()
Overrides:
Updates the validation panel visibility.
public virtual void UpdateValidationPanelVisibility()
Events
Occurs when binding object is created.
public event BindingCreatedEventHandler BindingCreated
Occurs when a binding object for an editor is about to be created. This event is cancelable.
public event BindingCreatingEventHandler BindingCreating
Occurs when the editor is Initialized.
public event EditorInitializedEventHandler EditorInitialized
Occurs when editor is being initialized. This event is cancelable
public event EditorInitializingEventHandler EditorInitializing
Occurs the item is already Initialized.
public event DataLayoutItemInitializedEventHandler ItemInitialized
This event is firing when the item associated with a given field is about to be Initialized. This event is cancelable..
public event DataLayoutItemInitializingEventHandler ItemInitializing
Occurs when the value of editor is changed.
public event DataLayoutItemValidatedEventHandler ItemValidated
Occurs when the value of editor is about to change.
public event DataLayoutItemValidatingEventHandler ItemValidating