Class GroupColumnExpandCommand
Collapses or Expands the group by columns based on summary columns
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Windows.Forms.Spreadsheet.Commands
Assembly: Syncfusion.Spreadsheet.Windows.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(Spreadsheet, String)
Initializes a new instance of the Syncfusion.UI.Xaml.Spreadsheet.Commands.GroupColumnExpandCommand class.
Declaration
public GroupColumnExpandCommand(Spreadsheet SfSpreadsheet, string commandName)
Parameters
Type | Name | Description |
---|---|---|
Spreadsheet | SfSpreadsheet | An instance of |
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
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
Remarks
The grouping range can be collapsed or expanded based on the summary columns