alexa
menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class GridLengthUnitType

    Defines the constants that specify how the elements in a SfDataGrid are sized.

    The GridLengthUnitType enumeration is used by sizing-related APIs such as ColumnSizer to determine whether column widths are calculated from content, header text, or available space.

    Use None to keep the default line size, Auto or the auto-fill options to size based on content, SizeToCells and SizeToHeader to measure a single region, and Star to distribute remaining space proportionally.
    Inheritance
    System.Object
    GridLengthUnitType
    Namespace: Syncfusion.UI.Xaml.Grid
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public sealed class GridLengthUnitType : Enum

    Fields

    Auto

    The column width is determined by the content of both the cells and the column header.

    Declaration
    public const GridLengthUnitType Auto
    Field Value
    Type
    GridLengthUnitType

    AutoLastColumnFill

    The column width is determined by the content of both the cells and the column header, and the last column automatically fills the remaining available space. Any column can be chosen to fill the space.

    Declaration
    public const GridLengthUnitType AutoLastColumnFill
    Field Value
    Type
    GridLengthUnitType

    AutoWithLastColumnFill

    The column width is determined by the content of both the cells and the column header, and the last column is filled by default. Any column can be chosen to fill the remaining space.

    Declaration
    public const GridLengthUnitType AutoWithLastColumnFill
    Field Value
    Type
    GridLengthUnitType

    None

    No sizing is applied. The column uses the default line size configured for the grid.

    Declaration
    public const GridLengthUnitType None
    Field Value
    Type
    GridLengthUnitType

    SizeToCells

    The column width is determined by the content of the cells only.

    Declaration
    public const GridLengthUnitType SizeToCells
    Field Value
    Type
    GridLengthUnitType

    SizeToHeader

    The column width is determined by the content of the column header only.

    Declaration
    public const GridLengthUnitType SizeToHeader
    Field Value
    Type
    GridLengthUnitType

    Star

    The column width is a weighted proportion of the available space.

    Declaration
    public const GridLengthUnitType Star
    Field Value
    Type
    GridLengthUnitType
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved