ClassGridDataCellElement
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
GridDataCellElement(GridViewColumn, GridRowElement)
Initializes a new instance of the GridDataCellElement class.
Declaration
public GridDataCellElement(GridViewColumn column, GridRowElement row)
Parameters
column
The column that this cell belongs to.
row
The row that this cell belongs to.
Fields
ContainsErrorsProperty
Identifies the ContainsErrors dependency property.
Declaration
public static RadProperty ContainsErrorsProperty
Field Value
IsFirstDataCellProperty
Identifies the IsFirstDataCell dependency property.
Declaration
public static RadProperty IsFirstDataCellProperty
Field Value
IsInEditModeProperty
Identifies the IsInEditMode dependency property.
Declaration
public static RadProperty IsInEditModeProperty
Field Value
IsLastDataCellProperty
Identifies the IsLastDataCell dependency property.
Declaration
public static RadProperty IsLastDataCellProperty
Field Value
Properties
ContainsErrors
Gets a value indicating whether the cell's value is invalid or contains errors.
Declaration
public bool ContainsErrors { get; }
Property Value
true if the cell contains errors; otherwise, false.
DataColumnInfo
Gets the data column information associated with this cell.
Declaration
protected GridViewDataColumn DataColumnInfo { get; }
Property Value
The data column information.
Editor
Gets the current editor associated with this cell.
Declaration
public virtual IInputEditor Editor { get; }
Property Value
The active editor, or null if no editor is present.
Implements
ExpanderItem
Gets the self-referencing expander element associated with the cell.
Declaration
public GridExpanderItem ExpanderItem { get; }
Property Value
The expander item if the cell supports self-referencing; otherwise, null.
IsEditable
Gets a value indicating whether the cell is editable.
Declaration
public virtual bool IsEditable { get; }
Property Value
true if the cell can be edited; otherwise, false.
Implements
IsFirstDataCell
Gets or sets a value indicating whether this is the first data cell in the row.
Declaration
public virtual bool IsFirstDataCell { get; }
Property Value
true if this is the first data cell in the row; otherwise, false.
IsInEditMode
Gets a value indicating whether the current cell is in edit mode.
Declaration
public virtual bool IsInEditMode { get; }
Property Value
true if the cell is in edit mode; otherwise, false.
IsLastDataCell
Gets or sets a value indicating whether this is the last data cell in the row.
Declaration
public virtual bool IsLastDataCell { get; }
Property Value
true if this is the last data cell in the row; otherwise, false.
SelfReferenceLayout
Gets the self reference layout instance when the RadGridView is bound to self-reference data source.
Declaration
public SelfReferenceCellLayout SelfReferenceLayout { get; }
Property Value
The self reference layout instance, or null if not applicable.
SupportsConditionalFormatting
Gets a value indicating whether this instance supports conditional formatting.
Declaration
public override bool SupportsConditionalFormatting { get; }
Property Value
true if conditional formatting is supported; otherwise, false.
Overrides
Methods
AddEditor(IInputEditor)
Adds an editor to this cell.
Declaration
public virtual void AddEditor(IInputEditor editor)
Parameters
editor
The editor to add.
Implements
ApplyFormatString(object)
Applies the format string to the specified value.
ArrangeEditorElement(SizeF, RectangleF)
Arranges the editor element within the cell.
Declaration
protected virtual void ArrangeEditorElement(SizeF finalSize, RectangleF clientRect)
Parameters
finalSize
The final size available for arrangement.
clientRect
The client rectangle for arrangement.
ArrangeOverride(SizeF)
Arranges the inner elements within the available size.
ArrangeSelfReferencePanel(SizeF, ref RectangleF)
Arranges the self reference panel within the cell.
Declaration
protected virtual void ArrangeSelfReferencePanel(SizeF finalSize, ref RectangleF clientRect)
Parameters
finalSize
The final size available for arrangement.
clientRect
The client rectangle for arrangement.
BindColumnProperties()
Binds column properties to this cell element.
Declaration
protected override void BindColumnProperties()
Overrides
CalculateDesiredSize(SizeF, SizeF, SizeF)
Calculates the desired size of the element.
Declaration
protected override SizeF CalculateDesiredSize(SizeF availableSize, SizeF desiredSize, SizeF elementsDesiredSize)
Parameters
availableSize
The available size for the element.
desiredSize
The desired size of the element content.
elementsDesiredSize
The desired size of child elements.
Returns
The calculated desired size.
Overrides
CreateContextMenuItems(RadDropDownMenu)
Creates the context menu items for this cell.
Declaration
protected override void CreateContextMenuItems(RadDropDownMenu menu)
Parameters
menu
The menu to add items to.
Overrides
Detach()
Detaches this instance and resets property values to their defaults.
Declaration
public override void Detach()
Overrides
GetClipRect()
Gets the clipping rectangle for this cell element.
Declaration
protected override RectangleF GetClipRect()
Returns
A RectangleF representing the clipping rectangle.
Overrides
GetEditorElement(IInputEditor)
Gets the editor element associated with this cell element.
Declaration
public RadItem GetEditorElement(IInputEditor editor)
Parameters
editor
The editor which element to search for.
Returns
A RadItem that represents the editor element, or null if there is no editor element.
InitializeFields()
Initializes the fields.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the space required by the RadElement. Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
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
MergeMenus(IContextMenuManager, params object[])
Merges the context menu with the specified context menu manager.
Declaration
public override RadDropDownMenu MergeMenus(IContextMenuManager contextMenuManager, params object[] parameters)
Parameters
contextMenuManager
The context menu manager to merge with.
parameters
object[]
Additional parameters for menu merging.
Returns
The merged context menu, if successful; otherwise, null.
Overrides
NotifyFormatChanged(BaseFormattingObject)
Notifies the element that the formatting object has changed.
Declaration
protected override void NotifyFormatChanged(BaseFormattingObject oldFormat)
Parameters
oldFormat
The previous formatting object.
Overrides
OnCellFormatting(CellFormattingEventArgs)
Raises the cell formatting event.
Declaration
protected virtual void OnCellFormatting(CellFormattingEventArgs e)
Parameters
e
The cell formatting event arguments.
OnColumnPropertyChanged(RadPropertyChangedEventArgs)
Handles column property changes that affect this cell.
Declaration
protected override void OnColumnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
The property change event arguments.
Overrides
OnViewCellFormatting(CellFormattingEventArgs)
Raises the OnViewCellFormatting(CellFormattingEventArgs) event.
Declaration
protected override void OnViewCellFormatting(CellFormattingEventArgs e)
Parameters
e
The cell formatting event arguments.
Overrides
RemoveEditor(IInputEditor)
Removes an editor from this cell.
Declaration
public virtual void RemoveEditor(IInputEditor editor)
Parameters
editor
The editor to remove.
Implements
SetTextAlignment()
Sets the text alignment for the cell content based on the column's text alignment property.
Declaration
protected virtual void SetTextAlignment()
ShowContextMenu()
Shows the context menu for this cell.
Declaration
protected override void ShowContextMenu()
Overrides
UnbindColumnProperties()
Unbinds column properties from this cell element.
Declaration
protected override void UnbindColumnProperties()
Overrides
UpdateErrorInfo(GridViewCellInfo)
Updates the error information for the cell.
Declaration
protected virtual void UpdateErrorInfo(GridViewCellInfo cellInfo)
Parameters
cellInfo
The cell information containing error details.
UpdateInfoCore()
Updates the info core of the cell element.
Declaration
protected override void UpdateInfoCore()
Overrides
UpdateStyle(GridViewCellInfo)
Updates the visual style of the cell based on the cell information.
Declaration
protected virtual void UpdateStyle(GridViewCellInfo cellInfo)
Parameters
cellInfo
The cell information containing style properties.