ClassRadDataLayout
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
RadDataLayout()
Initializes a new instance of the RadDataLayout class.
Declaration
public RadDataLayout()
Properties
AutoSizeLabels
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.
Declaration
[Browsable(true)]
public bool AutoSizeLabels { get; set; }
Property Value
ClientMargin
Gets the margin around the client area of the control. In the default case, this should be the border thickness.
ColumnCount
Gets or sets the number of columns which will be used to arrange generated controls.
Declaration
[Browsable(true)]
public int ColumnCount { get; set; }
Property Value
Exceptions
Number Of Columns should be at least one
CurrentObject
Gets the current object.
Declaration
[Browsable(false)]
public object CurrentObject { get; }
Property Value
DataLayoutElement
Gets the instance of RadDataLayoutElement which is the main element in the hierarchy tree and encapsulates the actual functionality of RadDataLayout.
Declaration
[Browsable(false)]
public RadDataLayoutElement DataLayoutElement { get; }
Property Value
DataSource
Gets or sets the DataSource. Setting the DataSource will auto-generate editors for the fields in it.
Declaration
[Browsable(true)]
public object DataSource { get; set; }
Property Value
DefaultSize
Gets the default size of the RadDataLayout control.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
EnableNCModification
Gets a value indicating whether non-client modification is enabled for this control.
Declaration
protected override bool EnableNCModification { get; }
Property Value
Overrides
EnableNCPainting
Gets a value indicating whether non-client painting is enabled for this control.
Declaration
protected override bool EnableNCPainting { get; }
Property Value
Overrides
FlowDirection
Gets or sets a value indicating the flow direction of generated editors when the ColumnCount property has value bigger than 1.
Declaration
[Browsable(true)]
public FlowDirection FlowDirection { get; set; }
Property Value
ItemDefaultHeight
The ItemDefaultHeight property sets the height that generated items should have.
Declaration
[Browsable(true)]
public int ItemDefaultHeight { get; set; }
Property Value
LayoutControl
Gets the inner RadLayoutControl.
Declaration
[Browsable(true)]
public RadLayoutControl LayoutControl { get; }
Property Value
Manager
Gets the BindingManagerBase manager that is used to manage the current DataSource.
Declaration
[Browsable(false)]
public BindingManagerBase Manager { get; }
Property Value
ShowValidationPanel
Gets or sets a value indicating whether the validation panel should appear.
Declaration
[Browsable(false)]
public bool ShowValidationPanel { get; set; }
Property Value
ValidationPanel
Gets the validation panel.
Declaration
[Browsable(true)]
public ValidationPanel ValidationPanel { get; }
Property Value
Methods
CreateChildItems(RadElement)
Creates child elements for the RadDataLayout control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent element.
Overrides
Dispose(bool)
Releases the unmanaged resources used by the RadDataLayout and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides
EndInit()
Completes the initialization of the component and performs binding if necessary.
Declaration
public override void EndInit()
Overrides
GetNCMetrics()
Gets the non-client area metrics for the control.
InitializeInternalControls()
Initializes the RadLayoutControl and the ValidationPanel
Declaration
protected virtual void InitializeInternalControls()
OnBindingContextChanged(EventArgs)
Raises the BindingContextChanged event.
OnBindingCreated(object, BindingCreatedEventArgs)
Fires the BindingCreated event.
Declaration
protected virtual void OnBindingCreated(object sender, BindingCreatedEventArgs e)
Parameters
sender
The sender.
e
The BindingCreatedEventArgs instance containing the event data.
OnBindingCreating(object, BindingCreatingEventArgs)
Fires the BindingCreating event.
Declaration
protected virtual void OnBindingCreating(object sender, BindingCreatingEventArgs e)
Parameters
sender
The sender.
e
The BindingCreatingEventArgs instance containing the event data.
OnEditorInitialized(object, EditorInitializedEventArgs)
Fires the EditorInitialized event.
Declaration
protected virtual void OnEditorInitialized(object sender, EditorInitializedEventArgs e)
Parameters
sender
The sender.
e
The EditorInitializedEventArgs instance containing the event data.
OnEditorInitializing(object, EditorInitializingEventArgs)
Fires the EditorInitializing event.
Declaration
protected virtual void OnEditorInitializing(object sender, EditorInitializingEventArgs e)
Parameters
sender
The sender.
e
The EditorInitializingEventArgs instance containing the event data.
OnItemInitialized(object, DataLayoutItemInitializedEventArgs)
Fires the ItemInitialized event.
Declaration
protected virtual void OnItemInitialized(object sender, DataLayoutItemInitializedEventArgs e)
Parameters
sender
The sender.
e
DataLayoutItemInitializedEventArgs
The DataLayoutItemInitializedEventArgs instance containing the event data.
OnItemInitializing(object, DataLayoutItemInitializingEventArgs)
Fires the ItemInitializing event.
Declaration
protected virtual void OnItemInitializing(object sender, DataLayoutItemInitializingEventArgs e)
Parameters
sender
The sender.
e
DataLayoutItemInitializingEventArgs
The DataLayoutItemInitializingEventArgs instance containing the event data.
OnItemValidated(object, DataLayoutItemValidatedEventArgs)
Fires the ItemValidated event.
Declaration
protected virtual void OnItemValidated(object sender, DataLayoutItemValidatedEventArgs e)
Parameters
sender
The sender.
e
DataLayoutItemValidatedEventArgs
The DataLayoutItemValidatedEventArgs instance containing the event data.
OnItemValidating(object, DataLayoutItemValidatingEventArgs)
Fires the ItemValidating event.
Declaration
protected virtual void OnItemValidating(object sender, DataLayoutItemValidatingEventArgs e)
Parameters
sender
The sender.
e
DataLayoutItemValidatingEventArgs
The DataLayoutItemValidatingEventArgs instance containing the event data.
OnNCPaint(Graphics)
Performs custom painting of the non-client area.
OnSizeChanged(EventArgs)
Raises the SizeChanged event and invalidates the non-client area.
OnThemeChanged()
Raises the ThemeChanged event and updates theme-related properties.
Declaration
protected override void OnThemeChanged()
Overrides
ResetBackColorThemeOverrides()
Resets the background color theme overrides for this control and its internal layout control.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets the foreground color theme overrides for this control and its internal layout control.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Sets the background color theme overrides for this control and its internal layout control.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets the foreground color theme overrides for this control and its internal layout control.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
UpdateValidationPanelVisibility()
Updates the validation panel visibility.
Declaration
public virtual void UpdateValidationPanelVisibility()
Events
BindingCreated
Occurs when binding object is created.
Declaration
public event BindingCreatedEventHandler BindingCreated
Event Value
BindingCreating
Occurs when a binding object for an editor is about to be created. This event is cancelable.
Declaration
public event BindingCreatingEventHandler BindingCreating
Event Value
EditorInitialized
Occurs when the editor is Initialized.
Declaration
public event EditorInitializedEventHandler EditorInitialized
Event Value
EditorInitializing
Occurs when editor is being initialized. This event is cancelable
Declaration
public event EditorInitializingEventHandler EditorInitializing
Event Value
ItemInitialized
Occurs the item is already Initialized.
Declaration
public event DataLayoutItemInitializedEventHandler ItemInitialized
Event Value
ItemInitializing
This event is firing when the item associated with a given field is about to be Initialized. This event is cancelable..
Declaration
public event DataLayoutItemInitializingEventHandler ItemInitializing
Event Value
ItemValidated
Occurs when the value of editor is changed.
Declaration
public event DataLayoutItemValidatedEventHandler ItemValidated
Event Value
ItemValidating
Occurs when the value of editor is about to change.
Declaration
public event DataLayoutItemValidatingEventHandler ItemValidating
Event Value