RadDataLayoutElement
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
public RadDataLayoutElement()
Fields
The error icon property
public static RadProperty ErrorIconProperty
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.
public bool AutoSizeLabels { get; set; }
Gets or sets the number of columns which will be used to arrange generated controls.
public int ColumnCount { get; set; }
Number Of Columns should be at least one
Gets the current object.
public object CurrentObject { get; }
Gets or sets the data source.
public object DataSource { get; set; }
Gets or sets the icon of the Error provider.
[TypeConverter(typeof(ImageTypeConverter))]
public Image ErrorIcon { get; set; }
The error icon.
Gets or sets a value indicating the flow direction of generated editors when the ColumnCount property has value bigger than 1.
public FlowDirection FlowDirection { get; set; }
The ItemDefaultHeight property sets the height that generated items should have.
public int ItemDefaultHeight { get; set; }
Gets the manager.
public BindingManagerBase Manager { get; }
Methods
Arranges the controls.
protected virtual void ArrangeControls()
Arranges the labels.
protected virtual void ArrangeLabels()
Binds this instance.
public void Bind()
Clears this instance.
public void Clear()
Creates a control with the specified type for a given property.
protected virtual Control CreateControl(PropertyDescriptor property, Type editorType)
The property.
editorTypeTypeThe suggested editor type.
Returns:A Control instance.
Creates editor controls for each browsable property in the data source.
protected virtual void CreateEditors()
Finds the required properties.
protected virtual void FindRequiredProperties()
Generates the controls design time.
protected virtual void GenerateControlsDesignTime(int currentColumn, KeyValuePair<string, Control> pair, Size propertyItemControlSize, Point propertyItemControlLocation)
The current column.
pairKeyValuePair<string, Control>The pair.
propertyItemControlSizeSizeSize of the property item control.
propertyItemControlLocationPointThe property item control location.
Generates the controls run time.
protected virtual void GenerateControlsRunTime(int currentColumn, KeyValuePair<string, Control> pair, Size propertyItemControlSize, Point propertyItemControlLocation)
The current column.
pairKeyValuePair<string, Control>The pair.
propertyItemControlSizeSizeSize of the property item control.
propertyItemControlLocationPointThe property item control location.
Initializes the data entry.
protected virtual void InitializeDataEntry()
Initializes the fields.
protected override void InitializeFields()
Overrides:
Handles the binding context change event and updates the binding manager if necessary.
protected virtual void OnBindingContextChanged(EventArgs e)
The event arguments.
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.
Subscribes a control to validation events and sets up validation infrastructure for the specified DataLayoutControlItem.
public void SubscribeControl(DataLayoutControlItem item, PropertyDescriptor property)
The data layout control item to subscribe.
propertyPropertyDescriptorThe property descriptor associated with the control.
Events
Occurs when a binding has been created.
public event BindingCreatedEventHandler BindingCreated
Occurs when a binding is being created.
public event BindingCreatingEventHandler BindingCreating
Occurs when an editor has been initialized.
public event EditorInitializedEventHandler EditorInitialized
Occurs when an editor is being initialized.
public event EditorInitializingEventHandler EditorInitializing
Occurs when a data layout item has been initialized.
public event DataLayoutItemInitializedEventHandler ItemInitialized
Occurs when a data layout item is being initialized.
public event DataLayoutItemInitializingEventHandler ItemInitializing
Occurs when an item has been validated.
public event DataLayoutItemValidatedEventHandler ItemValidated
Occurs when an item is being validated.
public event DataLayoutItemValidatingEventHandler ItemValidating