Class GroupRowExpandCommand
Collapses or Expands the group by columns based on summary rows
Implements
System.Windows.Input.ICommand
Inherited Members
Namespace: Syncfusion.UI.Xaml.Spreadsheet.Commands
Assembly: Syncfusion.SfSpreadsheet.WPF.dll
Syntax
public class GroupRowExpandCommand : OutlineCommand, ICommand
Examples
The following code illustrates how to collapse and expand the group by rows
//Collapse group
spreadsheet.ActiveSheet.Range["A3:A6"].CollapseGroup(ExcelGroupBy.ByRows);
spreadsheet.ActiveGrid.RowHeights.SetHidden(3, 6, true);
spreadsheet.RefreshOutlines(true, false);
spreadsheet.ActiveGrid.InvalidateCells();
//Expand group
spreadsheet.ActiveSheet.Range["A3:A6"].ExpandGroup(ExcelGroupBy.ByRows);
spreadsheet.ActiveGrid.RowHeights.SetHidden(3, 6, false);
spreadsheet.RefreshOutlines(true, false);
spreadsheet.ActiveGrid.InvalidateCells();
Constructors
GroupRowExpandCommand(SfSpreadsheet, String)
Initializes a new instance of the GroupRowExpandCommand class.
Declaration
public GroupRowExpandCommand(SfSpreadsheet SfSpreadsheet, string commandName)
Parameters
Type | Name | Description |
---|---|---|
SfSpreadsheet | SfSpreadsheet | An instance of SfSpreadsheet |
System.String | commandName |
Methods
OnCanExecute(Object)
Determines whether the GroupRowExpandCommand 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 GroupRowExpandCommand
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 rows
Implements
System.Windows.Input.ICommand