Class GridCellElement
Represents the base class for all cells in RadGridView.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridCellElement : ConditionalFormattableGridVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IContextMenuProvider
  Constructors
GridCellElement(GridViewColumn, GridRowElement)
Initializes a new instance of the GridCellElement class.
Declaration
public GridCellElement(GridViewColumn column, GridRowElement row)
  Parameters
| 
        GridViewColumn
        column
         An instance of GridViewColumn.  | 
    
| 
        GridRowElement
        row
         An instance of GridRowElement.  | 
    
Fields
FormatStringProperty
IsCurrentColumnProperty
IsCurrentProperty
IsCurrentRowProperty
IsOddRowProperty
IsPinnedProperty
IsReadOnlyProperty
IsRowHoveredProperty
IsSelectedProperty
IsSortedProperty
oldContextMenu
PinPositionProperty
Properties
CanUpdateInfo
Gets the can update info.
Declaration
protected virtual bool CanUpdateInfo { get; }
  Property Value
| 
        System.Boolean
         The can update info.  | 
    
ColumnIndex
Returns the index of the ColumnInfo in the Columns.
Declaration
public int ColumnIndex { get; }
  Property Value
| 
        System.Int32
         
  | 
    
ColumnInfo
Gets the GridViewColumn which the cell belongs to.
Declaration
public virtual GridViewColumn ColumnInfo { get; protected set; }
  Property Value
| 
        GridViewColumn
         
  | 
    
ContextMenu
Gets or sets the context RadDropDownMenu associated with the cell.
Declaration
public virtual RadDropDownMenu ContextMenu { get; set; }
  Property Value
| 
        RadDropDownMenu
         
  | 
    
Implements
FormatString
Gets or sets the format string to be used for the cell's value.
Declaration
public virtual string FormatString { get; set; }
  Property Value
| 
        System.String
         
  | 
    
GridViewElement
Gets the grid view element.
Declaration
public RadGridViewElement GridViewElement { get; }
  Property Value
| 
        RadGridViewElement
         The grid view element.  | 
    
IsCurrent
Gets or sets a value indicating whether the cell is the current in the grid.
Declaration
public virtual bool IsCurrent { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsCurrentColumn
Gets or sets a value indicating whether the cell belongs to the current GridViewColumn in the grid.
Declaration
public virtual bool IsCurrentColumn { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsCurrentRow
Gets or sets a value indicating whether the cell belongs to the current GridViewRowInfo in the grid.
Declaration
public virtual bool IsCurrentRow { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsOddRow
Gets or sets a value indicating whether the cell belongs to an odd row.
Declaration
public virtual bool IsOddRow { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsPinned
Gets or sets a value indicating whether the cell is pinned.
Declaration
public virtual bool IsPinned { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsRowHovered
Gets or sets a value indicating whether the GridRowElement containing this cell is hovered.
Declaration
public virtual bool IsRowHovered { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsSelected
Gets or sets a value indicating whether the cell is selected.
Declaration
public virtual bool IsSelected { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
IsSorted
Gets or sets a value indicating whether the GridViewDataColumn containing this cell is sorted.
Declaration
public virtual bool IsSorted { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
MasterTemplate
Gets the root template element
Declaration
public MasterGridViewTemplate MasterTemplate { get; }
  Property Value
| 
        MasterGridViewTemplate
         
  | 
    
PinPosition
Gets or sets the pin position for the row. When the column is pinned, it cannot be moved from its location when a user scrolls horizontally.
Declaration
public PinnedColumnPosition PinPosition { get; set; }
  Property Value
| 
        PinnedColumnPosition
         
  | 
    
RowElement
Gets the GridRowElement which the cell belongs to.
Declaration
public GridRowElement RowElement { get; protected set; }
  Property Value
| 
        GridRowElement
         
  | 
    
RowIndex
Returns the index of the cell in the GridViewRowInfo.
Declaration
public int RowIndex { get; }
  Property Value
| 
        System.Int32
         
  | 
    
RowInfo
Declaration
public virtual GridViewRowInfo RowInfo { get; protected set; }
  Property Value
| 
        GridViewRowInfo
         
  | 
    
TableElement
Gets the table element.
Declaration
public GridTableElement TableElement { get; }
  Property Value
| 
        GridTableElement
         The table element.  | 
    
UpdatingInfo
Gets or sets the updating info.
Declaration
protected bool UpdatingInfo { get; set; }
  Property Value
| 
        System.Boolean
         The updating info.  | 
    
Value
Gets or sets the value represented by this cell.
Declaration
public virtual object Value { get; set; }
  Property Value
| 
        System.Object
         
  | 
    
ViewInfo
ViewTemplate
Methods
ApplyFormatString(Object)
Applies the FormatString to the specified object.
Declaration
protected virtual string ApplyFormatString(object value)
  Parameters
| 
        System.Object
        value
         
  | 
    
Returns
| 
        System.String
         
  | 
    
CreateContextMenuItems(RadDropDownMenu)
Creates the context menu items.
Declaration
protected virtual void CreateContextMenuItems(RadDropDownMenu menu)
  Parameters
| 
        RadDropDownMenu
        menu
         The menu.  | 
    
CreateTextParams()
Creates the text params.
Declaration
protected override TextParams CreateTextParams()
  Returns
| 
        TextParams
         
  | 
    
Overrides
DisposeManagedResources()
Disposes the managed resources.
Declaration
protected override void DisposeManagedResources()
  Overrides
GetSearchHighlightRanges()
Gets the search highlight ranges.
Declaration
protected virtual List<CharacterRange> GetSearchHighlightRanges()
  Returns
| 
        System.Collections.Generic.List<System.Drawing.CharacterRange>
         
  | 
    
Initialize(GridViewColumn, GridRowElement)
Initializes the cell with specified column and row
Declaration
public virtual void Initialize(GridViewColumn column, GridRowElement row)
  Parameters
| 
        GridViewColumn
        column
         An instance of GridViewColumn.  | 
    
| 
        GridRowElement
        row
         An instance of GridRowElement.  | 
    
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
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
| 
        System.Drawing.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
| 
        System.Drawing.SizeF
         The minimum size required by the element to be completely visible. Cannot be infinity.  | 
    
Overrides
Remarks
In this method call to the Measure method of each child must be made.
MergeMenus(IContextMenuManager, Object[])
Merges the context menu.
Declaration
public virtual RadDropDownMenu MergeMenus(IContextMenuManager contextMenuManager, params object[] parameters)
  Parameters
| 
        IContextMenuManager
        contextMenuManager
         The IContextMenuManager to merge with.  | 
    
| 
        System.Object[]
        parameters
         merge parameters.  | 
    
Returns
| 
        RadDropDownMenu
         The merged context menu, if successfull.  | 
    
Implements
MergeMenus(IContextMenuProvider, Object[])
Merges the context menu.
Declaration
public virtual RadDropDownMenu MergeMenus(IContextMenuProvider contextMenuProvider, params object[] parameters)
  Parameters
| 
        IContextMenuProvider
        contextMenuProvider
         The IContextMenuProvider to merge with.  | 
    
| 
        System.Object[]
        parameters
         merge parameters.  | 
    
Returns
| 
        RadDropDownMenu
         The merged context menu, if successful.  | 
    
Implements
MergeMenus(RadDropDownMenu, Object[])
Merges the context menu.
Declaration
public virtual RadDropDownMenu MergeMenus(RadDropDownMenu contextMenu, params object[] parameters)
  Parameters
| 
        RadDropDownMenu
        contextMenu
         The RadDropDownMenu to merge with.  | 
    
| 
        System.Object[]
        parameters
         merge parameters.  | 
    
Returns
| 
        RadDropDownMenu
         The merged context menu, if successful.  | 
    
Implements
OnMouseMove(MouseEventArgs)
Raises the MouseMove event.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
  Parameters
| 
        System.Windows.Forms.MouseEventArgs
        e
         The System.Windows.Forms.MouseEventArgs instance containing the event data.  | 
    
Overrides
OnViewCellFormatting(CellFormattingEventArgs)
Raises the ViewCellFormatting event.
Declaration
protected virtual void OnViewCellFormatting(CellFormattingEventArgs e)
  Parameters
| 
        CellFormattingEventArgs
        e
         The CellFormattingEventArgs instance containing the event data.  | 
    
PaintElement(IGraphics, Single, SizeF)
Paints the element.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
  Parameters
| 
        IGraphics
        graphics
         The graphics.  | 
    
| 
        System.Single
        angle
         The angle.  | 
    
| 
        System.Drawing.SizeF
        scale
         The scale.  | 
    
Overrides
PaintElementSkin(IGraphics)
Provides a routine to paint element's content when system skin appearance is desired.
Declaration
protected override void PaintElementSkin(IGraphics graphics)
  Parameters
| 
        IGraphics
        graphics
         
  | 
    
Overrides
SetContent()
Sets the value of the cell.
Declaration
public virtual void SetContent()
  SetContentCore(Object)
Sets the actual text of the cell.
Declaration
protected virtual void SetContentCore(object value)
  Parameters
| 
        System.Object
        value
         
  | 
    
ShowContextMenu()
Shows the context menu.
Declaration
protected virtual void ShowContextMenu()
  UpdateInfo()
Updates the visual state of the cell.
Declaration
public virtual void UpdateInfo()
  UpdateInfoCore()
Updates the visual state of the cell.
Declaration
protected virtual void UpdateInfoCore()