GridDataCellElement
This is the base class for all data bound cells in RadGridView
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class GridDataCellElement : GridVirtualizedCellElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IContextMenuProvider, IVirtualizedElement<GridViewColumn>, IEditableCell, IDataConversionInfoProvider, ITypeDescriptorContext, IServiceProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementGridVisualElementConditionalFormattableGridVisualElementGridCellElementGridVirtualizedCellElementGridDataCellElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the GridDataCellElement class.
public GridDataCellElement(GridViewColumn column, GridRowElement row)
The column that this cell belongs to.
rowGridRowElementThe row that this cell belongs to.
Fields
Identifies the ContainsErrors dependency property.
public static RadProperty ContainsErrorsProperty
Identifies the IsFirstDataCell dependency property.
public static RadProperty IsFirstDataCellProperty
Identifies the IsInEditMode dependency property.
public static RadProperty IsInEditModeProperty
Identifies the IsLastDataCell dependency property.
public static RadProperty IsLastDataCellProperty
Properties
Gets a value indicating whether the cell's value is invalid or contains errors.
public bool ContainsErrors { get; }
true if the cell contains errors; otherwise, false.
Gets the data column information associated with this cell.
protected GridViewDataColumn DataColumnInfo { get; }
The data column information.
Gets the current editor associated with this cell.
public virtual IInputEditor Editor { get; }
The active editor, or null if no editor is present.
Implements:
Gets the self-referencing expander element associated with the cell.
public GridExpanderItem ExpanderItem { get; }
The expander item if the cell supports self-referencing; otherwise, null.
Gets a value indicating whether the cell is editable.
public virtual bool IsEditable { get; }
true if the cell can be edited; otherwise, false.
Implements:
Gets or sets a value indicating whether this is the first data cell in the row.
public virtual bool IsFirstDataCell { get; }
true if this is the first data cell in the row; otherwise, false.
Gets a value indicating whether the current cell is in edit mode.
public virtual bool IsInEditMode { get; }
true if the cell is in edit mode; otherwise, false.
Gets or sets a value indicating whether this is the last data cell in the row.
public virtual bool IsLastDataCell { get; }
true if this is the last data cell in the row; otherwise, false.
Gets the self reference layout instance when the RadGridView is bound to self-reference data source.
public SelfReferenceCellLayout SelfReferenceLayout { get; }
The self reference layout instance, or null if not applicable.
Gets a value indicating whether this instance supports conditional formatting.
public override bool SupportsConditionalFormatting { get; }
true if conditional formatting is supported; otherwise, false.
Overrides:
Methods
Adds an editor to this cell.
public virtual void AddEditor(IInputEditor editor)
The editor to add.
Implements:
Arranges the editor element within the cell.
protected virtual void ArrangeEditorElement(SizeF finalSize, RectangleF clientRect)
The final size available for arrangement.
clientRectRectangleFThe client rectangle for arrangement.
Arranges the self reference panel within the cell.
protected virtual void ArrangeSelfReferencePanel(SizeF finalSize, ref RectangleF clientRect)
The final size available for arrangement.
clientRectRectangleFThe client rectangle for arrangement.
Binds column properties to this cell element.
protected override void BindColumnProperties()
Overrides:
Calculates the desired size of the element.
protected override SizeF CalculateDesiredSize(SizeF availableSize, SizeF desiredSize, SizeF elementsDesiredSize)
The available size for the element.
desiredSizeSizeFThe desired size of the element content.
elementsDesiredSizeSizeFThe desired size of child elements.
Returns:The calculated desired size.
Overrides:
Creates the context menu items for this cell.
protected override void CreateContextMenuItems(RadDropDownMenu menu)
The menu to add items to.
Overrides:
Detaches this instance and resets property values to their defaults.
public override void Detach()
Overrides:
Gets the clipping rectangle for this cell element.
protected override RectangleF GetClipRect()
A RectangleF representing the clipping rectangle.
Overrides:
Gets the editor element associated with this cell element.
public RadItem GetEditorElement(IInputEditor editor)
The editor which element to search for.
Returns:A RadItem that represents the editor element, or null if there is no editor element.
Initializes the fields.
protected override void InitializeFields()
Overrides:
Measures the space required by the RadElement. Used by the layout system.
protected override SizeF MeasureOverride(SizeF availableSize)
The size that is available to the RadElement. The available size can be infinity (to take the full size of the element).
Returns:The minimum size required by the element to be completely visible. Cannot be infinity.
Overrides:
Merges the context menu with the specified context menu manager.
public override RadDropDownMenu MergeMenus(IContextMenuManager contextMenuManager, params object[] parameters)
The context menu manager to merge with.
parametersobject[]Additional parameters for menu merging.
Returns:The merged context menu, if successful; otherwise, null.
Overrides:
Notifies the element that the formatting object has changed.
protected override void NotifyFormatChanged(BaseFormattingObject oldFormat)
The previous formatting object.
Overrides:
Raises the cell formatting event.
protected virtual void OnCellFormatting(CellFormattingEventArgs e)
The cell formatting event arguments.
Handles column property changes that affect this cell.
protected override void OnColumnPropertyChanged(RadPropertyChangedEventArgs e)
The property change event arguments.
Overrides:
Raises the OnViewCellFormatting(CellFormattingEventArgs) event.
protected override void OnViewCellFormatting(CellFormattingEventArgs e)
The cell formatting event arguments.
Overrides:
Removes an editor from this cell.
public virtual void RemoveEditor(IInputEditor editor)
The editor to remove.
Implements:
Sets the text alignment for the cell content based on the column's text alignment property.
protected virtual void SetTextAlignment()
Shows the context menu for this cell.
protected override void ShowContextMenu()
Overrides:
Unbinds column properties from this cell element.
protected override void UnbindColumnProperties()
Overrides:
Updates the error information for the cell.
protected virtual void UpdateErrorInfo(GridViewCellInfo cellInfo)
The cell information containing error details.
Updates the info core of the cell element.
protected override void UpdateInfoCore()
Overrides:
Updates the visual style of the cell based on the cell information.
protected virtual void UpdateStyle(GridViewCellInfo cellInfo)
The cell information containing style properties.