Class 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.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadDataLayout : RadNCEnabledControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadDataLayout()
Properties
AutoSize
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
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
public bool AutoSizeLabels { get; set; }
Property Value
System.Boolean
|
ClientMargin
Gets the margin around the client area of the control. In the default case, this should be the border thickness.
Declaration
public Padding ClientMargin { get; }
Property Value
System.Windows.Forms.Padding
|
ColumnCount
Gets or sets the number of columns which will be used to arrange generated controls.
Declaration
public int ColumnCount { get; set; }
Property Value
System.Int32
|
Exceptions
System.ArgumentException
Number Of Columns should be at least one |
CurrentObject
Gets the current object.
Declaration
public object CurrentObject { get; }
Property Value
System.Object
|
DataLayoutElement
Gets the instance of RadDataLayoutElement which is the main element in the hierarchy tree and encapsulates the actual functionality of RadDataLayout.
Declaration
public RadDataLayoutElement DataLayoutElement { get; }
Property Value
RadDataLayoutElement
|
DataSource
Gets or sets the DataSource. Setting the DataSource will auto-generate editors for the fields in it.
Declaration
public object DataSource { get; set; }
Property Value
System.Object
|
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
EnableNCModification
Declaration
protected override bool EnableNCModification { get; }
Property Value
System.Boolean
|
Overrides
EnableNCPainting
Declaration
protected override bool EnableNCPainting { get; }
Property Value
System.Boolean
|
Overrides
FlowDirection
Gets or sets a value indicating the flow direction of generated editors when the ColumnCount property has value bigger than 1.
Declaration
public FlowDirection FlowDirection { get; set; }
Property Value
System.Windows.Forms.FlowDirection
|
ItemDefaultHeight
The ItemDefaultHeight property sets the height that generated items should have.
Declaration
public int ItemDefaultHeight { get; set; }
Property Value
System.Int32
|
LayoutControl
Gets the inner RadLayoutControl.
Declaration
public RadLayoutControl LayoutControl { get; }
Property Value
RadLayoutControl
|
Manager
Gets the BindingManagerBase manager that is used to manage the current DataSource.
Declaration
public BindingManagerBase Manager { get; }
Property Value
System.Windows.Forms.BindingManagerBase
|
ShowValidationPanel
Gets or sets a value indicating whether the validation panel should appear.
Declaration
public bool ShowValidationPanel { get; set; }
Property Value
System.Boolean
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
ValidationPanel
Gets the validation panel.
Declaration
public ValidationPanel ValidationPanel { get; }
Property Value
ValidationPanel
|
Methods
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
Overrides
EndInit()
GetNCMetrics()
Declaration
protected override Padding GetNCMetrics()
Returns
System.Windows.Forms.Padding
|
Overrides
InitializeInternalControls()
Initializes the RadLayoutControl and the ValidationPanel
Declaration
protected virtual void InitializeInternalControls()
OnBindingContextChanged(EventArgs)
Declaration
protected override void OnBindingContextChanged(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnBindingCreated(Object, BindingCreatedEventArgs)
Fires the BindingCreated event.
Declaration
protected virtual void OnBindingCreated(object sender, BindingCreatedEventArgs e)
Parameters
System.Object
sender
The sender. |
BindingCreatedEventArgs
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
System.Object
sender
The sender. |
BindingCreatingEventArgs
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
System.Object
sender
The sender. |
EditorInitializedEventArgs
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
System.Object
sender
The sender. |
EditorInitializingEventArgs
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
System.Object
sender
The sender. |
DataLayoutItemInitializedEventArgs
e
The DataLayoutItemInitializedEventArgs instance containing the event data. |
OnItemInitializing(Object, DataLayoutItemInitializingEventArgs)
Fires the ItemInitializing event.
Declaration
protected virtual void OnItemInitializing(object sender, DataLayoutItemInitializingEventArgs e)
Parameters
System.Object
sender
The sender. |
DataLayoutItemInitializingEventArgs
e
The DataLayoutItemInitializingEventArgs instance containing the event data. |
OnItemValidated(Object, DataLayoutItemValidatedEventArgs)
Fires the ValidatedItem event.
Declaration
protected virtual void OnItemValidated(object sender, DataLayoutItemValidatedEventArgs e)
Parameters
System.Object
sender
The sender. |
DataLayoutItemValidatedEventArgs
e
The DataLayoutItemValidatedEventArgs instance containing the event data. |
OnItemValidating(Object, DataLayoutItemValidatingEventArgs)
Fires the ValidatingItem event.
Declaration
protected virtual void OnItemValidating(object sender, DataLayoutItemValidatingEventArgs e)
Parameters
System.Object
sender
The sender. |
DataLayoutItemValidatingEventArgs
e
The DataLayoutItemValidatingEventArgs instance containing the event data. |
OnNCPaint(Graphics)
Declaration
protected override void OnNCPaint(Graphics g)
Parameters
System.Drawing.Graphics
g
|
Overrides
OnSizeChanged(EventArgs)
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
System.EventArgs
e
|
OnThemeChanged()
ResetBackColorThemeOverrides()
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
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 Type
BindingCreatedEventHandler
|
BindingCreating
Occurs when a binding object for an editor is about to be created. This event is cancelable.
Declaration
public event BindingCreatingEventHandler BindingCreating
Event Type
BindingCreatingEventHandler
|
EditorInitialized
Occurs when the editor is Initialized.
Declaration
public event EditorInitializedEventHandler EditorInitialized
Event Type
EditorInitializedEventHandler
|
EditorInitializing
Occurs when editor is being initialized. This event is cancelable
Declaration
public event EditorInitializingEventHandler EditorInitializing
Event Type
EditorInitializingEventHandler
|
ItemInitialized
Occurs the item is already Initialized.
Declaration
public event DataLayoutItemInitializedEventHandler ItemInitialized
Event Type
DataLayoutItemInitializedEventHandler
|
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 Type
DataLayoutItemInitializingEventHandler
|
ItemValidated
Occurs when the value of editor is changed.
Declaration
public event DataLayoutItemValidatedEventHandler ItemValidated
Event Type
DataLayoutItemValidatedEventHandler
|
ItemValidating
Occurs when the value of editor is about to change.
Declaration
public event DataLayoutItemValidatingEventHandler ItemValidating
Event Type
DataLayoutItemValidatingEventHandler
|