menu

UWP

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

    Show / Hide Table of Contents

    Class GroupColumnExpandCommand

    Collapses or Expands the group by columns based on summary columns

    Inheritance
    System.Object
    CommandBase
    OutlineCommand
    GroupColumnExpandCommand
    Implements
    System.Windows.Input.ICommand
    Inherited Members
    CommandBase.CanExecute(Object)
    CommandBase.CanExecuteChanged
    CommandBase.CommandName
    CommandBase.Execute(Object)
    CommandBase.RaiseCanExecuteChanged()
    CommandBase.SfSpreadsheet
    Namespace: Syncfusion.UI.Xaml.Spreadsheet.Commands
    Assembly: Syncfusion.SfSpreadsheet.UWP.dll
    Syntax
    public class GroupColumnExpandCommand : OutlineCommand, ICommand
    Examples

    The following code illustrates how to collapse and expand the group by columns

    //Collapse group
    spreadsheet.ActiveSheet.Range["A3:A6"].CollapseGroup(ExcelGroupBy.ByColumns);
    spreadsheet.ActiveGrid.ColumnWidths.SetHidden(3, 6, true);
    spreadsheet.RefreshOutlines(false, true);
    spreadsheet.ActiveGrid.InvalidateCells();
    
    //Expand group
    spreadsheet.ActiveSheet.Range["A3:A6"].ExpandGroup(ExcelGroupBy.ByColumns);
    spreadsheet.ActiveGrid.ColumnWidths.SetHidden(3, 6, false);
    spreadsheet.RefreshOutlines(false, true);
    spreadsheet.ActiveGrid.InvalidateCells();

    Constructors

    GroupColumnExpandCommand(SfSpreadsheet, String)

    Initializes a new instance of the GroupColumnExpandCommand class.

    Declaration
    public GroupColumnExpandCommand(SfSpreadsheet SfSpreadsheet, string commandName)
    Parameters
    Type Name Description
    SfSpreadsheet SfSpreadsheet

    An instance of SfSpreadsheet

    System.String commandName

    Methods

    OnCanExecute(Object)

    Determines whether the GroupColumnExpandCommand can be executed or not

    Declaration
    public override bool OnCanExecute(object parameter)
    Parameters
    Type Name Description
    System.Object parameter

    True or False

    Returns
    Type Description
    System.Boolean

    True or false

    Overrides
    OutlineCommand.OnCanExecute(Object)
    Remarks

    This command cannot be executed if the worksheet is protected

    OnExecute(Object)

    Executes the GroupColumnExpandCommand

    Declaration
    protected override void OnExecute(object parameter)
    Parameters
    Type Name Description
    System.Object parameter

    null

    Overrides
    OutlineCommand.OnExecute(Object)
    Remarks

    The grouping range can be collapsed or expanded based on the summary columns

    Implements

    System.Windows.Input.ICommand

    Extension Methods

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