ClassRadDataLayoutElement
The main element of RadDataLayout control. Handles the logic of creating and arranging items when the control is databound.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadDataLayoutElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadDataLayoutElement
Implements:
Inherited Members
Constructors
RadDataLayoutElement()
Declaration
public RadDataLayoutElement()
Fields
ErrorIconProperty
The error icon property
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.
ColumnCount
Gets or sets the number of columns which will be used to arrange generated controls.
Declaration
public int ColumnCount { get; set; }
Property Value
Exceptions
Number Of Columns should be at least one
CurrentObject
Gets the current object.
DataSource
Gets or sets the data source.
ErrorIcon
Gets or sets the icon of the Error provider.
Declaration
[TypeConverter(typeof(ImageTypeConverter))]
public Image ErrorIcon { get; set; }
Property Value
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
ItemDefaultHeight
The ItemDefaultHeight property sets the height that generated items should have.
Manager
Gets the manager.
Declaration
public BindingManagerBase Manager { get; }
Property Value
Methods
ArrangeControls()
Arranges the controls.
Declaration
protected virtual void ArrangeControls()
ArrangeLabels()
Arranges the labels.
Declaration
protected virtual void ArrangeLabels()
CreateBinding(Control, string, string)
Creates the 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
property
The property.
editorType
The suggested editor type.
Returns
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(int, 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
currentColumn
The current column.
pair
The pair.
propertyItemControlSize
Size of the property item control.
propertyItemControlLocation
The property item control location.
GenerateControlsRunTime(int, 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
currentColumn
The current column.
pair
The pair.
propertyItemControlSize
Size of the property item control.
propertyItemControlLocation
The property item control location.
GetSuggestedEditorType(Type)
Gets the suggested editor type for the specified property type.
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
e
The event arguments.
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.
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
item
The data layout control item to subscribe.
property
The property descriptor associated with the control.
Events
BindingCreated
Occurs when a binding has been created.
Declaration
public event BindingCreatedEventHandler BindingCreated
Event Value
BindingCreating
Occurs when a binding is being created.
Declaration
public event BindingCreatingEventHandler BindingCreating
Event Value
EditorInitialized
Occurs when an editor has been initialized.
Declaration
public event EditorInitializedEventHandler EditorInitialized
Event Value
EditorInitializing
Occurs when an editor is being initialized.
Declaration
public event EditorInitializingEventHandler EditorInitializing
Event Value
ItemInitialized
Occurs when a data layout item has been initialized.
Declaration
public event DataLayoutItemInitializedEventHandler ItemInitialized
Event Value
ItemInitializing
Occurs when a data layout item is being initialized.
Declaration
public event DataLayoutItemInitializingEventHandler ItemInitializing
Event Value
ItemValidated
Occurs when an item has been validated.
Declaration
public event DataLayoutItemValidatedEventHandler ItemValidated
Event Value
ItemValidating
Occurs when an item is being validated.
Declaration
public event DataLayoutItemValidatingEventHandler ItemValidating
Event Value