menu

WinForms

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

    Show / Hide Table of Contents

    Class GridStaticCellModel

    Defines the data / model part of a static cell. A static cell is also a base class for many other cell types that display text.

    Inheritance
    System.Object
    NonFinalizeDisposable
    Disposable
    GridCellModelBase
    GridStaticCellModel
    DateTimeCellModel
    DoubleTextBoxCellModel
    DropDownCalculatorTextBoxCellModel
    IntegerTextBoxCellModel
    GridCurrencyTextBoxCellModel
    GridGenericControlCellModel
    GridHeaderCellModel
    GridImageCellModel
    GridMaskEditCellModel
    GridProgressBarCellModel
    GridRadioButtonCellModel
    GridRichControlEditCellModel
    GridTextBoxCellModel
    GridNestedTableControlCellModel
    GridTableHeaderCellModel
    PivotGridExpandCellCellModel
    PivotGridHeaderCellModel
    PivotGridHyperlinkCellModel
    Implements
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    GridCellModelBase.ActiveTextChanged
    GridCellModelBase.ApplyFormattedText(GridStyleInfo, String, Int32)
    GridCellModelBase.ApplyText(GridStyleInfo, String)
    GridCellModelBase.BindingContext
    GridCellModelBase.ButtonBarSize
    GridCellModelBase.CalculatePreferredCellSize(Graphics, Int32, Int32, GridStyleInfo, GridQueryBounds)
    GridCellModelBase.CreateCopy(GridModel)
    GridCellModelBase.Description
    GridCellModelBase.Dispose()
    GridCellModelBase.ForceCoveredCellFullBounds
    GridCellModelBase.GetActiveText(Int32, Int32)
    GridCellModelBase.GetCellClientSize(Int32, Int32, GridStyleInfo)
    GridCellModelBase.GetCellSize(Int32, Int32)
    GridCellModelBase.GetFormattedOrActiveTextAt(Int32, Int32, GridStyleInfo)
    GridCellModelBase.GetFormattedText(GridStyleInfo, Object, Int32)
    GridCellModelBase.GetLocalizedString(String)
    GridCellModelBase.GetPropertyDescriptor(GridStyleInfo)
    GridCellModelBase.GetText(GridStyleInfo, Object)
    GridCellModelBase.GetTypeConverter(GridStyleInfo)
    GridCellModelBase.Grid
    GridCellModelBase.IsDisposed
    GridCellModelBase.IsDisposing
    GridCellModelBase.MeasureEmptyCellString
    GridCellModelBase.MeasureSampleWString(Graphics, Font)
    GridCellModelBase.OnActiveTextChanged(GridCellEventArgs)
    GridCellModelBase.OnBindingContextChanged(EventArgs)
    GridCellModelBase.OnModelDeserialization(Object, GridModel)
    GridCellModelBase.ResetActiveText(Int32, Int32)
    GridCellModelBase.SerializeSchemeVersion
    GridCellModelBase.SetActiveText(Int32, Int32, String)
    GridCellModelBase.SubtractBorders(Rectangle, GridStyleInfo)
    GridCellModelBase.SubtractBorders(Rectangle, GridStyleInfo, Boolean)
    NonFinalizeDisposable.Dispose(Boolean)
    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)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridStaticCellModel : GridCellModelBase, ISerializable, IDisposable
    Remarks

    You typically access cell models through the CellModels property of the GridModel class.

    A GridStaticCellModel can serve as model for several GridStaticCellRenderer instances if a there are several GridControlBase views for a GridModel.

    See GridStaticCellRenderer for more detailed information about this cell type.

    Constructors

    GridStaticCellModel(GridModel)

    Initializes a new GridStaticCellModel object and stores a reference to the GridModel this cell belongs to.

    Declaration
    public GridStaticCellModel(GridModel grid)
    Parameters
    Type Name Description
    GridModel grid

    The GridModel for this cell model.

    Remarks

    You typically access cell models through the CellModels property of the GridModel class.

    GridStaticCellModel(SerializationInfo, StreamingContext)

    Initializes a new GridStaticCellModel from a serialization stream.

    Declaration
    protected GridStaticCellModel(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    An object that holds all the data needed to serialize or deserialize this instance.

    System.Runtime.Serialization.StreamingContext context

    Describes the source and destination of the serialized stream specified by info.

    Properties

    AllowFloating

    Gets or sets a value indicating whether this cell type supports being floated or flooded.

    Declaration
    public bool AllowFloating { get; set; }
    Property Value
    Type
    System.Boolean

    AllowMerging

    Gets or sets a value indicating whether this cell type supports being merged.

    Declaration
    public bool AllowMerging { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    CreateRenderer(GridControlBase)

    Creates a renderer for this cell model.

    Declaration
    public override GridCellRendererBase CreateRenderer(GridControlBase control)
    Parameters
    Type Name Description
    GridControlBase control

    The grid control.

    Returns
    Type Description
    GridCellRendererBase

    Cell renderer.

    Overrides
    GridCellModelBase.CreateRenderer(GridControlBase)

    GetObjectData(SerializationInfo, StreamingContext)

    Implements the ISerializable interface and returns the data needed to serialize the cell model.

    Declaration
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    A SerializationInfo object containing the information required to serialize the cell model.

    System.Runtime.Serialization.StreamingContext context

    A StreamingContext object containing the source and destination of the serialized stream.

    Overrides
    GridCellModelBase.GetObjectData(SerializationInfo, StreamingContext)

    OnQueryCanFloatCell(Int32, Int32, GridStyleInfo, GridQueryFloatCell)

    Determines whether the cell supports floating over a neighboring cell or can be flooded by a previous cell.

    Declaration
    public override bool OnQueryCanFloatCell(int rowIndex, int colIndex, GridStyleInfo style, GridQueryFloatCell query)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    GridQueryFloatCell query

    A GridQueryFloatCell value that specifies whether a cell is asked about support for floating over another cell or being flooded by a previous cell.

    Returns
    Type Description
    System.Boolean

    True if floating is possible; False otherwise.

    Overrides
    GridCellModelBase.OnQueryCanFloatCell(Int32, Int32, GridStyleInfo, GridQueryFloatCell)

    OnQueryCanMergeCell(Int32, Int32, GridStyleInfo, GridMergeCellDirection)

    Determines whether the cell supports merging of neighboring cells.

    Declaration
    public override bool OnQueryCanMergeCell(int rowIndex, int colIndex, GridStyleInfo style, GridMergeCellDirection mergeCellDirection)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    GridMergeCellDirection mergeCellDirection

    Specifies if rows or columns should be merged.

    Returns
    Type Description
    System.Boolean

    True if merging is possible; False otherwise.

    Overrides
    GridCellModelBase.OnQueryCanMergeCell(Int32, Int32, GridStyleInfo, GridMergeCellDirection)

    OnQueryPrefferedClientSize(Graphics, Int32, Int32, GridStyleInfo, GridQueryBounds)

    Calculates the preferred size of the cell based on its contents without margins and any buttons.

    Declaration
    protected override Size OnQueryPrefferedClientSize(Graphics g, int rowIndex, int colIndex, GridStyleInfo style, GridQueryBounds queryBounds)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    GridQueryBounds queryBounds

    Graphical bounds

    Returns
    Type Description
    System.Drawing.Size

    The optimal size of the cell.

    Overrides
    GridCellModelBase.OnQueryPrefferedClientSize(Graphics, Int32, Int32, GridStyleInfo, GridQueryBounds)

    Implements

    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved