Class RadDataLayoutElement
The main element of RadDataLayout control. Handles the logic of creating and arranging items when the control is databound.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadDataLayoutElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadDataLayoutElement()
Declaration
public RadDataLayoutElement()
Fields
ErrorIconProperty
The error icon property
Declaration
public static RadProperty ErrorIconProperty
Field Value
|
RadProperty
|
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
public bool AutoSizeLabels { get; set; }
Property Value
|
System.Boolean
|
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
|
DataSource
Gets or sets the data source.
Declaration
public object DataSource { get; set; }
Property Value
|
System.Object
|
ErrorIcon
Gets or sets the icon of the Error provider.
Declaration
public Image ErrorIcon { get; set; }
Property Value
|
System.Drawing.Image
The error icon. |
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
|
Manager
Gets the manager.
Declaration
public BindingManagerBase Manager { get; }
Property Value
|
System.Windows.Forms.BindingManagerBase
|
Methods
ArrangeControls()
Arranges the controls.
Declaration
protected virtual void ArrangeControls()
ArrangeLabels()
Arranges the labels.
Declaration
protected virtual void ArrangeLabels()
Bind()
Binds this instance.
Declaration
public void Bind()
Clear()
Clears this instance.
Declaration
public void Clear()
CreateBinding(Control, String, String)
Creates the binding.
Declaration
protected virtual Binding CreateBinding(Control control, string propertyName, string dataMember)
Parameters
|
System.Windows.Forms.Control
control
The control. |
|
System.String
propertyName
Name of the property. |
|
System.String
dataMember
The data member. |
Returns
|
System.Windows.Forms.Binding
Binding. |
CreateControl(PropertyDescriptor, Type)
Creates a control with the specified type for a given property.
Declaration
protected virtual Control CreateControl(PropertyDescriptor property, Type editorType)
Parameters
|
System.ComponentModel.PropertyDescriptor
property
The property. |
|
System.Type
editorType
The suggested editor type. |
Returns
|
System.Windows.Forms.Control
A Control instance. |
CreateEditors()
Creates editor controls for each browsable property in the data source.
Declaration
protected virtual void CreateEditors()
FindRequiredProperties()
Finds the required properties.
Declaration
protected virtual void FindRequiredProperties()
GenerateControlsDesignTime(Int32, KeyValuePair<String, Control>, Size, Point)
Generates the controls design time.
Declaration
protected virtual void GenerateControlsDesignTime(int currentColumn, KeyValuePair<string, Control> pair, Size propertyItemControlSize, Point propertyItemControlLocation)
Parameters
|
System.Int32
currentColumn
The current column. |
|
System.Collections.Generic.KeyValuePair<System.String, System.Windows.Forms.Control>
pair
The pair. |
|
System.Drawing.Size
propertyItemControlSize
Size of the property item control. |
|
System.Drawing.Point
propertyItemControlLocation
The property item control location. |
GenerateControlsRunTime(Int32, KeyValuePair<String, Control>, Size, Point)
Generates the controls run time.
Declaration
protected virtual void GenerateControlsRunTime(int currentColumn, KeyValuePair<string, Control> pair, Size propertyItemControlSize, Point propertyItemControlLocation)
Parameters
|
System.Int32
currentColumn
The current column. |
|
System.Collections.Generic.KeyValuePair<System.String, System.Windows.Forms.Control>
pair
The pair. |
|
System.Drawing.Size
propertyItemControlSize
Size of the property item control. |
|
System.Drawing.Point
propertyItemControlLocation
The property item control location. |
GetSuggestedEditorType(Type)
Gets the suggested editor type for the specified property type.
Declaration
protected virtual Type GetSuggestedEditorType(Type propertyType)
Parameters
|
System.Type
propertyType
The property type. |
Returns
|
System.Type
The type of the suggested editor. |
InitializeDataEntry()
Initializes the data entry.
Declaration
protected virtual void InitializeDataEntry()
InitializeFields()
Initializes the fields.
Declaration
protected override void InitializeFields()
Overrides
OnBindingContextChanged(EventArgs)
Handles the binding context change event and updates the binding manager if necessary.
Declaration
protected virtual void OnBindingContextChanged(EventArgs e)
Parameters
|
System.EventArgs
e
The event arguments. |
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 ItemValidated 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 ItemValidating 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. |
SubscribeControl(DataLayoutControlItem, PropertyDescriptor)
Subscribes a control to validation events and sets up validation infrastructure for the specified DataLayoutControlItem.
Declaration
public void SubscribeControl(DataLayoutControlItem item, PropertyDescriptor property)
Parameters
|
DataLayoutControlItem
item
The data layout control item to subscribe. |
|
System.ComponentModel.PropertyDescriptor
property
The property descriptor associated with the control. |
Events
BindingCreated
Occurs when a binding has been created.
Declaration
public event BindingCreatedEventHandler BindingCreated
Event Type
|
BindingCreatedEventHandler
|
BindingCreating
Occurs when a binding is being created.
Declaration
public event BindingCreatingEventHandler BindingCreating
Event Type
|
BindingCreatingEventHandler
|
EditorInitialized
Occurs when an editor has been initialized.
Declaration
public event EditorInitializedEventHandler EditorInitialized
Event Type
|
EditorInitializedEventHandler
|
EditorInitializing
Occurs when an editor is being initialized.
Declaration
public event EditorInitializingEventHandler EditorInitializing
Event Type
|
EditorInitializingEventHandler
|
ItemInitialized
Occurs when a data layout item has been initialized.
Declaration
public event DataLayoutItemInitializedEventHandler ItemInitialized
Event Type
|
DataLayoutItemInitializedEventHandler
|
ItemInitializing
Occurs when a data layout item is being initialized.
Declaration
public event DataLayoutItemInitializingEventHandler ItemInitializing
Event Type
|
DataLayoutItemInitializingEventHandler
|
ItemValidated
Occurs when an item has been validated.
Declaration
public event DataLayoutItemValidatedEventHandler ItemValidated
Event Type
|
DataLayoutItemValidatedEventHandler
|
ItemValidating
Occurs when an item is being validated.
Declaration
public event DataLayoutItemValidatingEventHandler ItemValidating
Event Type
|
DataLayoutItemValidatingEventHandler
|