menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridStaticCellRenderer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridStaticCellRenderer

    Defines the renderer part of a static cell. A static cell renderer is also a base class for many other cell types and provides the inactive cell rendering for cell types that support editing (such as a text box or combo box).

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridCellRendererBase
    GridStaticCellRenderer
    DateTimeCellRenderer
    DoubleTextBoxCellRenderer
    IntegerTextBoxCellRenderer
    GridCurrencyTextBoxCellRenderer
    GridGenericControlCellRenderer
    GridHeaderCellRenderer
    GridImageCellRenderer
    GridMaskEditCellRenderer
    GridProgressBarCellRenderer
    GridRadioButtonCellRenderer
    GridRichControlEditCellRenderer
    GridTextBoxCellRenderer
    GridNestedTableControlCellRenderer
    GridTableHeaderCellRenderer
    PivotGridExpandCellCellRenderer
    PivotGridHeaderCellRenderer
    PivotGridHyperlinkCellRenderer
    Implements
    IQueryFocusInside
    IGridDropDownCell
    IPopupParent
    IPopupItem
    System.IDisposable
    Inherited Members
    GridCellRendererBase.AddButton(GridCellButton)
    GridCellRendererBase.AlwaysRaiseCellClick
    GridCellRendererBase.CanPaste()
    GridCellRendererBase.ChildClosing(IPopupChild, PopupCloseType)
    GridCellRendererBase.ClickOverImage
    GridCellRendererBase.ColIndex
    GridCellRendererBase.Control
    GridCellRendererBase.ControlDoubleClick(Object, EventArgs)
    GridCellRendererBase.ControlGotFocus(Object, EventArgs)
    GridCellRendererBase.ControlLostFocus(Object, EventArgs)
    GridCellRendererBase.ControlMouseDown(Object, MouseEventArgs)
    GridCellRendererBase.ControlText
    GridCellRendererBase.ControlValue
    GridCellRendererBase.Copy()
    GridCellRendererBase.CreateDropDownContainer()
    GridCellRendererBase.CurrentCell
    GridCellRendererBase.CurrentStyle
    GridCellRendererBase.Cut()
    GridCellRendererBase.Dispose()
    GridCellRendererBase.Dispose(Boolean)
    GridCellRendererBase.Draw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
    GridCellRendererBase.DrawBackground(Graphics, Rectangle, GridStyleInfo, Boolean)
    GridCellRendererBase.DrawCellAppearance(Graphics, Rectangle, GridStyleInfo)
    GridCellRendererBase.DrawSingleCell(Graphics, Rectangle, Int32, Int32, GridStyleInfo, Boolean)
    GridCellRendererBase.DropDownButton
    GridCellRendererBase.DropDownContainer
    GridCellRendererBase.DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)
    GridCellRendererBase.DropDownContainerShowedDropDown(Object, EventArgs)
    GridCellRendererBase.DropDownContainerShowingDropDown(Object, CancelEventArgs)
    GridCellRendererBase.DropDownImp
    GridCellRendererBase.DropDownPart
    GridCellRendererBase.EnsureDropDownContainer()
    GridCellRendererBase.FindText(String, Int32, Int32, GridFindTextOptions, Boolean)
    GridCellRendererBase.ForceRefreshOnActivateCell
    GridCellRendererBase.GetButton(Int32)
    GridCellRendererBase.GetCellBoundsCore(Int32, Int32)
    GridCellRendererBase.GetCellBoundsCore(Int32, Int32, Boolean)
    GridCellRendererBase.GetCellBoundsCoreInt(Int32, Int32, Boolean)
    GridCellRendererBase.GetCellClientRectangle(Int32, Int32, GridStyleInfo, Boolean)
    GridCellRendererBase.GetCellLayout(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.GetCellText(GridStyleInfo, GridFindTextOptions)
    GridCellRendererBase.GetCellValue()
    GridCellRendererBase.GetDisplayText()
    GridCellRendererBase.GetEditState()
    GridCellRendererBase.GetMarkHeaderState(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.GetNestedCurrentCell()
    GridCellRendererBase.GetSelectedText(String)
    GridCellRendererBase.Grid
    GridCellRendererBase.HasControlText
    GridCellRendererBase.HasControlValue
    GridCellRendererBase.HasFocusControl
    GridCellRendererBase.Hide()
    GridCellRendererBase.InBeginEdit
    GridCellRendererBase.InInitialize
    GridCellRendererBase.Initalized
    GridCellRendererBase.InitalizedAt(Int32, Int32)
    GridCellRendererBase.Initialize(Int32, Int32)
    GridCellRendererBase.InitializeControlText(Object)
    GridCellRendererBase.InitializedAt(Int32, Int32)
    GridCellRendererBase.InitializeDropDownContainer()
    GridCellRendererBase.InSetControlText
    GridCellRendererBase.InSetControlValue
    GridCellRendererBase.InSetSetControlValue
    GridCellRendererBase.IPopupItem.GetPopupParentControl()
    GridCellRendererBase.IPopupParent.GetBorderOverlapCue(PopupRelativeAlignment)
    GridCellRendererBase.IPopupParent.GetLocationForPopupAlignment(PopupRelativeAlignment, PopupRelativeAlignment)
    GridCellRendererBase.IPopupParent.IsRightToLeft
    GridCellRendererBase.IsControlVisible()
    GridCellRendererBase.IsDisposed
    GridCellRendererBase.IsDisposing
    GridCellRendererBase.IsDroppedDown
    GridCellRendererBase.IsEditing
    GridCellRendererBase.IsReadOnly()
    GridCellRendererBase.IsRelatedControl(Control, Boolean)
    GridCellRendererBase.Model
    GridCellRendererBase.MouseDownPoint
    GridCellRendererBase.MouseDownTick
    GridCellRendererBase.NotifyCurrentCellChanged()
    GridCellRendererBase.NotifyCurrentCellChanging()
    GridCellRendererBase.NotifyCurrentCellControlDoubleClick(Control)
    GridCellRendererBase.NotifyCurrentCellControlGotFocus(Control)
    GridCellRendererBase.NotifyCurrentCellControlLostFocus(Control)
    GridCellRendererBase.NotifyShowedDropDown()
    GridCellRendererBase.NotifyShowingDropDown(Size)
    GridCellRendererBase.OnActivated()
    GridCellRendererBase.OnActivating(Int32, Int32)
    GridCellRendererBase.OnBeginEdit()
    GridCellRendererBase.OnButtonClicked(Int32, Int32, Int32)
    GridCellRendererBase.OnCancelMode(Int32, Int32)
    GridCellRendererBase.OnCellLayoutChanged()
    GridCellRendererBase.OnClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnCloseDropDown(PopupCloseType)
    GridCellRendererBase.OnControlDoubleClick(Control)
    GridCellRendererBase.OnDeactivating()
    GridCellRendererBase.OnDeactived(Int32, Int32)
    GridCellRendererBase.OnDeleting()
    GridCellRendererBase.OnDoubleClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnDrawCellBackground(GridDrawCellBackgroundEventArgs)
    GridCellRendererBase.OnDrawCellButton(GridCellButton, Graphics, Int32, Int32, Boolean, GridStyleInfo)
    GridCellRendererBase.OnDrawCellButtonBackground(GridCellButton, Graphics, Rectangle, ButtonState, GridStyleInfo)
    GridCellRendererBase.OnEditingComplete()
    GridCellRendererBase.OnEndEdit()
    GridCellRendererBase.OnGetCursor(Int32, Int32)
    GridCellRendererBase.OnGridGotFocus(EventArgs)
    GridCellRendererBase.OnHasFocusControlChanged()
    GridCellRendererBase.OnHitTest(Int32, Int32, MouseEventArgs, IMouseController)
    GridCellRendererBase.OnInitialize(Int32, Int32)
    GridCellRendererBase.OnKeyDown(KeyEventArgs)
    GridCellRendererBase.OnKeyPress(KeyPressEventArgs)
    GridCellRendererBase.OnKeyUp(KeyEventArgs)
    GridCellRendererBase.OnLayout(Int32, Int32, GridStyleInfo, Rectangle, Rectangle[])
    GridCellRendererBase.OnModelChanged(EventArgs)
    GridCellRendererBase.OnMouseDown(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnMouseHover(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnMouseHoverEnter(Int32, Int32)
    GridCellRendererBase.OnMouseHoverLeave(Int32, Int32, EventArgs)
    GridCellRendererBase.OnMouseMove(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnMouseUp(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnNotifyMsg(Message)
    GridCellRendererBase.OnOutlineCurrentCell(Graphics, Rectangle)
    GridCellRendererBase.OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)
    GridCellRendererBase.OnQueryShowButtons(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.OnRejectChanges()
    GridCellRendererBase.OnSaveChanges()
    GridCellRendererBase.OnScrollInView(GridScrollCurrentCellReason)
    GridCellRendererBase.OnSetControlText(String)
    GridCellRendererBase.OnShowDropDown()
    GridCellRendererBase.OnStartEditing()
    GridCellRendererBase.OnValidate()
    GridCellRendererBase.OnValidated()
    GridCellRendererBase.Paste()
    GridCellRendererBase.PerformLayout(Int32, Int32)
    GridCellRendererBase.PerformLayout(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.PerformLayout(Int32, Int32, GridStyleInfo, Rectangle)
    GridCellRendererBase.ProcessKeyEventArgs(Message)
    GridCellRendererBase.ProcessMouseWheel(MouseEventArgs)
    GridCellRendererBase.QueryFocusInside()
    GridCellRendererBase.RaiseCancelMode(Int32, Int32)
    GridCellRendererBase.RaiseClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseDoubleClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseGetCursor(Int32, Int32)
    GridCellRendererBase.RaiseHitTest(Int32, Int32, MouseEventArgs, IMouseController)
    GridCellRendererBase.RaiseMouseDown(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseMouseHover(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseMouseHoverEnter(Int32, Int32)
    GridCellRendererBase.RaiseMouseHoverLeave(Int32, Int32, EventArgs)
    GridCellRendererBase.RaiseMouseMove(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseMouseUp(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseProcessKeyEventArgs(Message)
    GridCellRendererBase.RemoveButton(GridCellButton)
    GridCellRendererBase.ReplaceSel(String)
    GridCellRendererBase.ReplaceText(String, String, Int32, Int32, GridFindTextOptions, Boolean)
    GridCellRendererBase.ResetCellLayout()
    GridCellRendererBase.ResetControlText()
    GridCellRendererBase.ResetControlValue()
    GridCellRendererBase.RowIndex
    GridCellRendererBase.ScaleFactor
    GridCellRendererBase.SetControl(Control)
    GridCellRendererBase.SetControlValue(Object, Boolean)
    GridCellRendererBase.SetEditState(Object)
    GridCellRendererBase.ShouldDrawEditing(Int32, Int32)
    GridCellRendererBase.ShouldDrawFocused(Int32, Int32)
    GridCellRendererBase.ShouldRefreshCurrentCell()
    GridCellRendererBase.StyleInfo
    GridCellRendererBase.SupportsEditing
    GridCellRendererBase.SupportsFocusControl
    GridCellRendererBase.ToString()
    GridCellRendererBase.UnwireModel(GridCellModelBase)
    GridCellRendererBase.UpdateControlValue()
    GridCellRendererBase.ValidateString(String)
    GridCellRendererBase.WireModel(GridCellModelBase)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridStaticCellRenderer : GridCellRendererBase, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
    Remarks

    A renderer is created for each GridCellModelBase and GridControlBase. There can be several renderers associated with one GridStaticCellModel if several views display the same GridModel.

    The following table lists some characteristics about the Static cell type.

    ItemDescription
    CellTypeStatic
    RendererGridStaticCellRenderer
    ModelGridStaticCellModel
    XP Themes SupportNA
    InteractiveClick Only
    Floating SupportBoth
    Base TypeGridCellRendererBase

    The cell's behavior and appearance can be customized with the following properties of the GridStyleInfo class.

    PropertyNameDescription
    BackgroundImage (System.Drawing.Image)Gets / sets the image that the cell displays as background. (Default: NULL)
    BackgroundImageMode (GridBackgroundImageMode)Indicates how the background image is displayed. (Default: GridBackgroundImageMode)
    BaseStyle (System.String)The base style for this style instance with default values for properties that are not initialized for this style object. (Default: String.Empty)
    Borders (GridBordersInfo)Top, left, bottom, and right border settings. (Default: GridBordersInfo.Default)
    CellAppearance (GridCellAppearance)Specifies if cell edges shall be drawn raised, sunken, or flat (default). (Default: GridCellAppearance.Flat)
    CellTipText (System.String)ToolTip text to be displayed when user hovers mouse over cell. (Default: String.Empty)
    CellType (System.String)Static. (Default: TextBox)
    CellValue (System.Object)This property holds the cell value. Although the cell value is typically a string, it can also be any other primitive type such as int, byte, enum, or any custom type that is derived from System.Object. (Default: String.Empty)
    CellValueType (System.Type)Specifies the preferred System.Type for cell values. When you assign a value to the GridStyleInfo object, the value will be converted to this type. If the value cannot be converted, Error will contain error information. (Default: null)
    CultureInfo (System.Globalization.CultureInfo)The culture information holds rules for parsing and formatting the cells value. (Default: null)
    Enabled (System.Boolean)Specifies if the cell can be activated as current cell or if the cell should be skipped when moving the current cell. (Default: true)
    Error (System.String)Holds error information if a value could not be converted to the System.Type specified with CellValueType. (Default: String.Empty)
    FloatCell (System.Boolean)Gets / sets if text can float into the boundaries of a neighboring cell. (Default: true)
    FloodCell (System.Boolean)Gets / sets if this cell can be flooded by a previous cell. (Default: true)
    Font (GridFontInfo)The font for drawing text. (Default: GridFontInfo.Default)
    Format (System.String)Gets / sets the format mask for formatting the cell value. You can specify numeric format strings, date format strings, or enumeration format strings as discussed in the section "Format Specifiers and Format Providers" of the .NET Framework Developers Guide (see ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconformatspecifiersformatproviders.htm) (Default: String.Empty)
    HorizontalAlignment (GridHorizontalAlignment)Specifies horizontal alignment of text in the cell. (Default: GridHorizontalAlignment.Left)
    HotkeyPrefix (System.Drawing.Text.HotkeyPrefix)Specifies how hot-key prefixes should be displayed. Hot-keys are indicated in text with an '&' (ampersand). When you enable hot-key prefix, the specific characters can be displayed underlined or regular. The '&' will not be displayed. (Default: HotkeyPrefix.Show)
    ImageIndex (System.Int32)Specifies an index for an image in the ImageList of a GridStyleInfo instance. (Default: -1)
    ImageList (System.Windows.Forms.ImageList)The ImageList that holds a collection of images. Cells can choose images with the ImageIndex property in a GridStyleInfo instance. (Default: NULL)
    Interior (BrushInfo) Lets you specify a solid backcolor, gradient, or pattern style with both back and forecolor for a cell's background. (Default: SystemColors.Window)
    MergeCell (GridMergeCellDirection)Specifies merge behavior for an individual cell when merging cells feature has been enabled in a GridModel with MergeCellsMode. (Default: GridMergeCellDirection.None)
    ReadOnly (System.Boolean)Specifies if cell contents can be modified by the user. You can programatically change Read-only cells by setting DiscardReadOnly to True. (Default: False)
    Text (System.String)Gets / sets the value as a string. If a CellValueType is specified, the text will be parsed and converted to the type specified with CellValueType using any CultureInfo information. (Default: String.Empty)
    TextColor (System.Drawing.Color)Lets you specify the color for drawing the cell text. (Default: SystemColors.WindowText)
    TextMargins (GridMarginsInfo)Holds text margins in pixels. When drawing a cell, this specifies the empty area between the text rectangle and the client rectangle of the cell without borders and cell buttons. (Default: GridMarginsInfo.Default)
    Trimming (System.Drawing.StringTrimming)Indicates how text is trimmed when it exceeds the edges of the cell text rectangle. (Default: StringTrimming.Character)
    ValidateValue (GridCellValidateValueInfo)Holds validation rules for the cell values that are being checked before any user changes are committed to the grid cell's style object. (Default: NULL)
    VerticalAlignment (GridVerticalAlignment)Specifies vertical alignment of text in the cell. (Default: GridVerticalAlignment.Top)
    WrapText (System.Boolean)Specifies if text should be wrapped when it does not fit into a single line. (Default: true)

    Constructors

    GridStaticCellRenderer(GridControlBase, GridCellModelBase)

    Initializes a new instance of the GridStaticCellRenderer class for the given GridControlBase and GridCellModelBase.

    Declaration
    public GridStaticCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
    Parameters
    Type Name Description
    GridControlBase grid

    The GridControlBase that display this cell renderer.

    GridCellModelBase cellModel

    The GridCellModelBase that holds data for this cell renderer that should be shared among views.

    Remarks

    References to GridControlBase, and GridCellModelBase will be saved.

    Methods

    CanCopy()

    Allows single cell copy for static cells..

    Declaration
    public override bool CanCopy()
    Returns
    Type
    System.Boolean
    Overrides
    GridCellRendererBase.CanCopy()

    CanCut()

    Allows single cell cut for static cells..

    Declaration
    public override bool CanCut()
    Returns
    Type
    System.Boolean
    Overrides
    GridCellRendererBase.CanCut()

    DrawImage(Graphics, ImageList, Int32, Rectangle)

    Draws an image at a given position in an ImageList onto the System.Drawing.Graphics canvas at a specified System.Drawing.Rectangle.

    Declaration
    [Obsolete("It is recommended to specify isRightToLeft parameter, default for isRightToLeft is False.")]
    public static Rectangle DrawImage(Graphics g, ImageList imageList, int imageIndex, Rectangle bounds)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.Windows.Forms.ImageList imageList

    The image list.

    System.Int32 imageIndex

    The image index in the image list.

    System.Drawing.Rectangle bounds

    The target rectangle where the image should be drawn.

    Returns
    Type Description
    System.Drawing.Rectangle

    The bounds of the rectangle. Might differ if it was vertically centered.

    DrawImage(Graphics, ImageList, Int32, Rectangle, Boolean)

    Draws an image at a given position in an ImageList onto the System.Drawing.Graphics canvas at a specified System.Drawing.Rectangle.

    Declaration
    public static Rectangle DrawImage(Graphics g, ImageList imageList, int imageIndex, Rectangle bounds, bool isRightToLeft)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.Windows.Forms.ImageList imageList

    The image list.

    System.Int32 imageIndex

    The image index in the image list.

    System.Drawing.Rectangle bounds

    The target rectangle where the image should be drawn.

    System.Boolean isRightToLeft

    Indicates if grid is in RightToLeft mode.

    Returns
    Type Description
    System.Drawing.Rectangle

    The bounds of the rectangle. Might differ if it was vertically centered.

    DrawImage(Graphics, ImageList, Int32, Rectangle, Rectangle, Boolean)

    Draws an image at a given position in an ImageList onto the System.Drawing.Graphics canvas at a specified System.Drawing.Rectangle.

    Declaration
    public static Rectangle DrawImage(Graphics g, ImageList imageList, int imageIndex, Rectangle bounds, Rectangle clipBounds, bool isRightToLeft)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.Windows.Forms.ImageList imageList

    The image list.

    System.Int32 imageIndex

    The image index in the image list.

    System.Drawing.Rectangle bounds

    The target rectangle where the image should be drawn.

    System.Drawing.Rectangle clipBounds

    The target rectangle where the image should be clipped.

    System.Boolean isRightToLeft

    Indicates if grid is in RightToLeft mode.

    Returns
    Type Description
    System.Drawing.Rectangle

    The bounds of the rectangle. Might differ if it was vertically centered.

    DrawRotatedString(Graphics, String, Font, Brush, RectangleF, StringFormat, Single, GridStyleInfo)

    Draws the text at the specified angle.

    Declaration
    public static void DrawRotatedString(Graphics g, string text, Font font, Brush br, RectangleF rect, StringFormat format, float angle, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Graphical Parameter

    System.String text

    THe text to be rotated

    System.Drawing.Font font

    The font Style of the text

    System.Drawing.Brush br

    The brush used to draw the text

    System.Drawing.RectangleF rect

    The text rectangle

    System.Drawing.StringFormat format

    the format that holds different alignment settings

    System.Single angle

    The angle at which the text is rotated

    GridStyleInfo style

    Used to store all the information of the cell

    DrawText(Graphics, String, Font, Rectangle, GridStyleInfo, Color)

    Draws a text at a given position onto the System.Drawing.Graphics canvas at a specified System.Drawing.Rectangle.

    Declaration
    [Obsolete("It is recommended to specify isRightToLeft parameter, default for isRightToLeft is False.")]
    public static void DrawText(Graphics g, string displayText, Font font, Rectangle textRectangle, GridStyleInfo style, Color textColor)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.String displayText

    The display text.

    System.Drawing.Font font

    The font value.

    System.Drawing.Rectangle textRectangle

    The text rectangle.

    GridStyleInfo style

    Cell information with alignment, trimming, and HotkeyPrefix information.

    System.Drawing.Color textColor

    The text color.

    DrawText(Graphics, String, Font, Rectangle, GridStyleInfo, Color, Boolean)

    Draws a text at a given position onto the System.Drawing.Graphics canvas at a specified System.Drawing.Rectangle.

    Declaration
    public static void DrawText(Graphics g, string displayText, Font font, Rectangle textRectangle, GridStyleInfo style, Color textColor, bool isRightToLeft)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.String displayText

    The display text.

    System.Drawing.Font font

    The font value.

    System.Drawing.Rectangle textRectangle

    The text rectangle.

    GridStyleInfo style

    Cell information with alignment, trimming, and HotkeyPrefix information.

    System.Drawing.Color textColor

    The text color.

    System.Boolean isRightToLeft

    Indicates if grid is in RightToLeft mode.

    DrawText(Graphics, String, Font, Rectangle, GridStyleInfo, Color, Boolean, Boolean)

    Draws a text at a given position onto the System.Drawing.Graphics canvas at a specified System.Drawing.Rectangle and draws text optionally disabled.

    Declaration
    public static void DrawText(Graphics g, string displayText, Font font, Rectangle textRectangle, GridStyleInfo style, Color textColor, bool drawDisabled, bool isRightToLeft)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.String displayText

    The display text.

    System.Drawing.Font font

    The font value.

    System.Drawing.Rectangle textRectangle

    The text rectangle.

    GridStyleInfo style

    Cell information with alignment, trimming, and HotkeyPrefix information.

    System.Drawing.Color textColor

    The text color.

    System.Boolean drawDisabled

    True if text should be drawn disabled.

    System.Boolean isRightToLeft

    Indicates if grid is in RightToLeft mode.

    GetRotatedTextBound(String, Font, StringFormat, Single, Single)

    Measures the Height and width of the text.

    Declaration
    public static RectangleF GetRotatedTextBound(string text, Font font, StringFormat format, float rotation, float dpiY)
    Parameters
    Type Name Description
    System.String text

    The Input Text

    System.Drawing.Font font

    Font style of the Text

    System.Drawing.StringFormat format

    Alignment Settings of the text

    System.Single rotation

    The Angle of Rotation of the Text

    System.Single dpiY

    Vertical Resolution of the Text

    Returns
    Type
    System.Drawing.RectangleF

    IsPointOverImage(Int32, Int32, Point)

    Checks if the specified point is over an image (see ImageIndex) .

    Declaration
    protected override bool IsPointOverImage(int rowIndex, int colIndex, Point pt)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Drawing.Point pt

    The point to be tested.

    Returns
    Type Description
    System.Boolean

    True if inside image; False otherwise.

    Overrides
    GridCellRendererBase.IsPointOverImage(Int32, Int32, Point)

    OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)

    This method is called from the cell renderer's draw method to draw the contents of the client bounds for the cell, e.g. the text for a static cell.

    Declaration
    protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.Drawing.Rectangle clientRectangle

    Specifies the client rectangle. It is the cell rectangle without buttons and borders.

    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    GridStyleInfo style

    The GridStyleInfo object holds the style information of a cell.

    Overrides
    GridCellRendererBase.OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)

    RemoveMargins(Rectangle, GridStyleInfo)

    Removes TextMargins from the specified client bounds.

    Declaration
    protected override Rectangle RemoveMargins(Rectangle clientRectangle, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Rectangle clientRectangle

    The Rectangle

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    Returns
    Type Description
    System.Drawing.Rectangle

    A System.Drawing.Rectangle with the bounds.

    Overrides
    GridCellRendererBase.RemoveMargins(Rectangle, GridStyleInfo)

    Implements

    IQueryFocusInside
    IGridDropDownCell
    IPopupParent
    IPopupItem
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved