alexa
menu

WinForms

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

    Show / Hide Table of Contents

    Class AutoSizeCalculationMode

    Defines the constants that specify the mode to measure the width cell based on its content.

    Inheritance
    System.Object
    AutoSizeCalculationMode
    Namespace: Syncfusion.WinForms.DataGrid.Enums
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public sealed class AutoSizeCalculationMode : Enum

    Fields

    Default

    Specifies that the cell size is calculated by calculating and comparing the size of the text in a cell.

    Declaration
    public const AutoSizeCalculationMode Default
    Field Value
    Type
    AutoSizeCalculationMode

    SmartFit

    Specifies that the cell size is calculated by calculating the string width of the longest string (maximum length) in a column.

    Declaration
    public const AutoSizeCalculationMode SmartFit
    Field Value
    Type
    AutoSizeCalculationMode
    Remarks

    By this way, the width will not be calculated for each cell and width is calculated for longest string alone. If '\n' exists in the cell content, the cell value will be splitted with '\n' and checks the maximum string length among the splitted string collection and calculates the width of the cell based on maximum string length found among the splitted string collection.

    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved