menu

UWP

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

    Show / Hide Table of Contents

    Class GridColumn

    Holds the information about each and every cell which are in view. It will updates the properties of cell element (GridCell) based on the styleInfo. This will triggered from GridRow when updating the cells.

    Inheritance
    System.Object
    NonFinalizeDisposable
    Disposable
    GridColumn
    SpreadsheetColumn
    Implements
    System.IDisposable
    IColumnElement
    Inherited Members
    Disposable.Finalize()
    NonFinalizeDisposable.Dispose()
    Namespace: Syncfusion.UI.Xaml.CellGrid
    Assembly: Syncfusion.SfCellGrid.UWP.dll
    Syntax
    public class GridColumn : Disposable, IDisposable, IColumnElement

    Constructors

    GridColumn(SfCellGrid)

    Initializes a new instance of the GridColumn class.

    Declaration
    public GridColumn(SfCellGrid grid)
    Parameters
    Type Name Description
    SfCellGrid grid

    An instance of SfCellGrid.

    Fields

    Height

    Declaration
    protected double Height
    Field Value
    Type
    System.Double

    Width

    Declaration
    protected double Width
    Field Value
    Type
    System.Double

    Properties

    CellRowColumnIndex

    Gets the value indicating the instance of RowColumnIndex of the column.

    Declaration
    public RowColumnIndex CellRowColumnIndex { get; }
    Property Value
    Type Description
    RowColumnIndex

    An instance of RowColumnIndex.

    ColumnIndex

    Gets or sets the column index.

    Declaration
    public int ColumnIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    Index of the column.

    ColumnRegion

    Gets or sets the ScrollAxisRegion of column.

    Declaration
    public ScrollAxisRegion ColumnRegion { get; set; }
    Property Value
    Type Description
    ScrollAxisRegion

    An instance of ScrollAxisRegion.

    CoveredCellInfo

    Gets the value of CoveredCellInfo if this is spanned column.

    Declaration
    public CoveredCellInfo CoveredCellInfo { get; }
    Property Value
    Type Description
    CoveredCellInfo

    An instance of CoveredCellInfo.

    DisplayText

    Gets or sets the display text.

    Declaration
    public string DisplayText { get; set; }
    Property Value
    Type Description
    System.String

    Text to be displayed.

    Element

    Gets the GridCell.

    Declaration
    public GridCell Element { get; protected set; }
    Property Value
    Type
    GridCell

    IsBordersDirty

    Gets or sets a value indicating whether the cell borders need to be updated or not.

    Declaration
    protected bool IsBordersDirty { get; set; }
    Property Value
    Type Description
    System.Boolean

    True or False.

    IsDirty

    Gets or sets a value indicating whether it needs to be rearranged or not .

    Declaration
    protected bool IsDirty { get; set; }
    Property Value
    Type Description
    System.Boolean

    True or False.

    Remarks

    Set as true, if this needs to be re arrange.

    IsEditing

    Gets the value indicating whether the s is in editing mode or not.

    Declaration
    public bool IsEditing { get; }
    Property Value
    Type Description
    System.Boolean

    True or False.

    IsEnsured

    Determines whether the column in ensured or not.(i.e., properties are updated on measure override)

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

    True or False.

    IsFloatingCell

    Determines whether cell is FloatingCell or not. FloatingCell means, whenever the cell width increased when cell value is exceeds the cellsize by taking next cell width.

    Declaration
    public bool IsFloatingCell { get; }
    Property Value
    Type Description
    System.Boolean

    True or false.

    IsFloodCell

    Determines whether cell is FloodCell or not. If any cells are used by floating cell then those cells are denoted as FloodCell and set the width as 0 for it.

    Declaration
    public bool IsFloodCell { get; }
    Property Value
    Type Description
    System.Boolean

    True or False.

    IsSpannedColum

    Gets a value indicating whether the cell is covered cell or not.

    Declaration
    public bool IsSpannedColum { get; }
    Property Value
    Type Description
    System.Boolean

    True or False.

    IsVisible

    Gets or sets the visiblity of the column.

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

    True or false.

    Renderer

    Gets or sets the IGridCellRenderer.

    Declaration
    public IGridCellRenderer Renderer { get; set; }
    Property Value
    Type
    IGridCellRenderer

    RowIndex

    Gets or sets the row index.

    Declaration
    public int RowIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    Index of the row.

    Methods

    Dispose(Boolean)

    Releases the unmanaged resources used by the GridColumn and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    True or False .

    Overrides
    NonFinalizeDisposable.Dispose(Boolean)

    EnsureFloatingCellSize(List<GridColumn>, Size, Int32)

    Calculate the floating cell size.

    Declaration
    protected virtual void EnsureFloatingCellSize(List<GridColumn> elements, Size cellSize, int arrayIndex)
    Parameters
    Type Name Description
    System.Collections.Generic.List<GridColumn> elements

    A list of GridColumn elements.

    Windows.Foundation.Size cellSize

    Size of the cell.

    System.Int32 arrayIndex

    Index.

    EnsureFloatingCellSizeOnEdit(String)

    Calculate the floating cell size in editing mode.

    Declaration
    protected virtual void EnsureFloatingCellSizeOnEdit(string text)
    Parameters
    Type Name Description
    System.String text

    Text to be displayed.

    GetColumnWidth()

    Used to get the column width.

    Declaration
    protected double GetColumnWidth()
    Returns
    Type Description
    System.Double

    Width of the column.

    GetCurrentCellRendererElement()

    Used to get the edit UIElement of the CurrentCell.

    Declaration
    protected virtual UIElement GetCurrentCellRendererElement()
    Returns
    Type Description
    Windows.UI.Xaml.UIElement

    A UIElement.

    GetDisplayTextSize(String, Size, Boolean)

    Calculate the display text size with help of MeasureText() based on cellsize And FloatingCellSize if FloatingCellSize is not an empty.

    Declaration
    protected virtual Size GetDisplayTextSize(string text, Size cellSize, bool wrapText)
    Parameters
    Type Name Description
    System.String text

    Display text

    Windows.Foundation.Size cellSize

    cell size

    System.Boolean wrapText

    true if textwrapping is applied else false

    Returns
    Type Description
    Windows.Foundation.Size

    Size of the text.

    GetRowHeight()

    Used to get the row height

    Declaration
    protected double GetRowHeight()
    Returns
    Type Description
    System.Double

    Height of the row.

    GetTextAlignment()

    Helper methods to get the horizontal alignment for the text.

    Declaration
    protected virtual HorizontalAlignment GetTextAlignment()
    Returns
    Type Description
    Windows.UI.Xaml.HorizontalAlignment

    An instance of Windows.UI.Xaml.HorizontalAlignment.

    GetTextWrapping()

    Get the textwrapping for the specified cell.

    Declaration
    protected virtual bool GetTextWrapping()
    Returns
    Type Description
    System.Boolean

    Returns true, if text is wrapped; otherwise, false.

    OnUpdateColumn(out FrameworkElement)

    Update the column properties such as renderer, cell type, style info, row index, column index, cell element etc.

    Declaration
    protected virtual void OnUpdateColumn(out FrameworkElement oldElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.FrameworkElement oldElement

    An System.Windows.Input.MouseEventArgs that contains the event data.

    PointerMoved(PointerRoutedEventArgs)

    Occurs when pointer/mouse hover the GridCell

    Declaration
    protected virtual void PointerMoved(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    An System.Windows.Input.MouseEventArgs that contains the event data.

    PointerPressed(PointerRoutedEventArgs)

    Occurs when pointer/mouse pressed on GridCell.

    Declaration
    protected virtual void PointerPressed(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    An System.Windows.Input.MouseEventArgs that contains the event data.

    PointerReleased(PointerRoutedEventArgs)

    Occurs when pointer/mouse released over GridCell

    Declaration
    protected virtual void PointerReleased(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    An System.Windows.Input.MouseButtonEventArgs that contains the event data.

    SetGridColumn()

    Used to set the GridColumn and grid to GridCell.

    Declaration
    protected void SetGridColumn()

    SetTextWrapping(Boolean)

    Set and reset the text wrapping while editing in floating cell.

    Declaration
    protected virtual void SetTextWrapping(bool setWrapText)
    Parameters
    Type Name Description
    System.Boolean setWrapText

    True or false.

    UpdateBorderStyle(Int32, Int32, Pen, Boolean)

    Update the border style for the specified cell or range.

    Declaration
    protected void UpdateBorderStyle(int rowindex, int colindex, Pen pen, bool isVertical)
    Parameters
    Type Name Description
    System.Int32 rowindex

    Row index of the cell.

    System.Int32 colindex

    Column index of the cell.

    Pen pen

    Outline for the cell.

    System.Boolean isVertical

    True or False.

    UpdateCellBorders()

    Update the cell borders of the current cell.

    Declaration
    protected virtual void UpdateCellBorders()

    UpdateColumn(out FrameworkElement)

    Update the column properties such as renderer, row index, column index, cell element etc.

    Declaration
    public void UpdateColumn(out FrameworkElement oldElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.FrameworkElement oldElement

    An element which maintains the GridCell.

    UpdateFloatingCellBorders()

    Update the borders of floating cells.

    Declaration
    protected virtual void UpdateFloatingCellBorders()

    UpdateHeaderCell()

    Used to update the Hidden column border of Header cell.

    Declaration
    protected void UpdateHeaderCell()

    UpdateSparklineBorder()

    Updates the Sparkline Border

    Declaration
    protected virtual void UpdateSparklineBorder()

    Implements

    System.IDisposable
    IColumnElement

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved