WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CommandExtensions - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class CommandExtensions

    Provides the Interaction logic for commands in SfSpreadsheet

    Inheritance
    System.Object
    CommandExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Spreadsheet.Commands
    Assembly: Syncfusion.Spreadsheet.Windows.dll
    Syntax
    public static class CommandExtensions

    Methods

    ApplyDataValidation(Spreadsheet, IWorksheet, IRange, ExcelDataType, ExcelDataValidationComparisonOperator, String, String, String, String, String, String, Boolean, Boolean, Boolean, Boolean)

    Apply the data validation for the selected range of cells with the specified criterias

    Declaration
    public static bool ApplyDataValidation(this Spreadsheet spreadsheet, IWorksheet worksheet, IRange validationRange, ExcelDataType allowType, ExcelDataValidationComparisonOperator ComparisonOperator, string conditionvalue1, string conditionvalue2, string PromptBoxTitle, string PromptBoxText, string ErrorBoxTitle, string ErrorBoxText, bool ShowPromptBox, bool ShowErrorBox, bool IgnoreBlank, bool InCellDropDown)
    Parameters
    Type Name Description
    Spreadsheet spreadsheet

    An instance of

    IWorksheet worksheet

    Current worksheet

    IRange validationRange

    Range where the data validation applied

    ExcelDataType allowType

    Type of Validation test to be performed

    ExcelDataValidationComparisonOperator ComparisonOperator

    The comparison Operation for the data validation

    System.String conditionvalue1

    Condition set for the first part of data validation

    System.String conditionvalue2

    Condition set for the second part of data validation

    System.String PromptBoxTitle

    Title of the PromptBox

    System.String PromptBoxText

    Text in the PromptBox

    System.String ErrorBoxTitle

    Title in the ErrorBox

    System.String ErrorBoxText

    Text in the ErrorBox

    System.Boolean ShowPromptBox

    True if PromptBox need to be shown, else False

    System.Boolean ShowErrorBox

    True if ErrorBox need to be shown, else False

    System.Boolean IgnoreBlank

    True if empty values are allowed, else False

    System.Boolean InCellDropDown

    True if the dropdown needs to be visible, else False

    Returns
    Type Description
    System.Boolean

    True or False

    ChangeFillColor(Spreadsheet, Color)

    Fills the color for the Selected cell/range of cells.

    Declaration
    public static void ChangeFillColor(this Spreadsheet SfSpreadsheet, Color fillColor)
    Parameters
    Type Name Description
    Spreadsheet SfSpreadsheet

    An instance of

    System.Drawing.Color fillColor

    Color to be Filled in the selected range

    ChangeFontColor(Spreadsheet, Color)

    Changes the color of the font for the selected cell/range of cells.

    Declaration
    public static void ChangeFontColor(this Spreadsheet SfSpreadsheet, Color fontColor)
    Parameters
    Type Name Description
    Spreadsheet SfSpreadsheet

    An instance of

    System.Drawing.Color fontColor

    Font Color to be changed

    ChangeFontFamily(Spreadsheet, String)

    Changes the font family for the selected cell/range of cells.

    Declaration
    public static void ChangeFontFamily(this Spreadsheet SfSpreadsheet, string fontFamily)
    Parameters
    Type Name Description
    Spreadsheet SfSpreadsheet

    An instance of

    System.String fontFamily

    Name of the FontFamily to be changed

    ChangeFontSize(Spreadsheet, Double)

    Changes the size of the font for the selected cell/range of cells.

    Declaration
    public static void ChangeFontSize(this Spreadsheet SfSpreadsheet, double size)
    Parameters
    Type Name Description
    Spreadsheet SfSpreadsheet

    An instance of

    System.Double size

    Size of the Font to be changed

    ChangeNumberFormat(Spreadsheet, String)

    Sets the NumberFormat for the selected cell/range of cells

    Declaration
    public static void ChangeNumberFormat(this Spreadsheet SfSpreadsheet, string numberFormat)
    Parameters
    Type Name Description
    Spreadsheet SfSpreadsheet

    An instance of

    System.String numberFormat

    The number format to be set for the cell

    ConvertColor(Color)

    Converts ARGB to the color

    Declaration
    public static Color ConvertColor(Color color)
    Parameters
    Type Name Description
    System.Drawing.Color color

    Color to be converted

    Returns
    Type Description
    System.Drawing.Color

    Color

    FocusActiveGrid(Spreadsheet)

    Set the Focus to the Active SpreadsheetGrid

    Declaration
    public static void FocusActiveGrid(this Spreadsheet spreadsheet)
    Parameters
    Type Name Description
    Spreadsheet spreadsheet

    An instance of

    FormatIndent(Spreadsheet, Boolean)

    For changing the alignment of the selected cell/range of cells.

    Declaration
    public static void FormatIndent(this Spreadsheet spreadsheet, bool canincrease)
    Parameters
    Type Name Description
    Spreadsheet spreadsheet

    An instance of

    System.Boolean canincrease

    True or False

    FormatIndentLevel(Spreadsheet, Int32)

    Set the indent based on the indent level value for the selected cell/range of cells

    Declaration
    public static void FormatIndentLevel(this Spreadsheet spreadsheet, int size)
    Parameters
    Type Name Description
    Spreadsheet spreadsheet

    An instance of

    System.Int32 size

    The indent level for the range

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