Spread Windows Forms 11.0 Product Documentation
RangeGroupStateChanged Event
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : RangeGroupStateChanged Event
Occurs when the user has changed the state of the row or column outline (range group).
Syntax
'Declaration
 
Public Event RangeGroupStateChanged As RangeGroupStateChangedEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As RangeGroupStateChangedEventHandler
 
AddHandler instance.RangeGroupStateChanged, handler
public event RangeGroupStateChangedEventHandler RangeGroupStateChanged
Event Data

The event handler receives an argument of type RangeGroupStateChangedEventArgs containing data related to this event. The following RangeGroupStateChangedEventArgs properties provide information specific to this event.

PropertyDescription
Gets whether the outline (range group) is a group of rows.  
Gets the infomation about the outline (range group) whose state has changed.  
Gets the view that contains the outline (range group) whose state has changed.  
Example
This example uses the RangeGroupStateChanged event.
fpSpread1.ActiveSheet.Rows.Count = 11;
fpSpread1.ActiveSheet.Columns.Count = 6;
FarPoint.Win.Spread.EnhancedInterfaceRenderer outlinelook = new FarPoint.Win.Spread.EnhancedInterfaceRenderer();
outlinelook.RangeGroupBackgroundColor = Color.LightGreen;
outlinelook.RangeGroupButtonBorderColor = Color.Red;
outlinelook.RangeGroupLineColor = Color.Blue;
fpSpread1.InterfaceRenderer = outlinelook;
fpSpread1.ActiveSheet.AddRangeGroup(0, 8, true);
fpSpread1.ActiveSheet.AddRangeGroup(0, 5, true);
fpSpread1.ActiveSheet.AddRangeGroup(1, 3, false);
fpSpread1.ActiveSheet.AddRangeGroup(1, 2, false);

 private void fpSpread1_RangeGroupStateChanged(object sender, FarPoint.Win.Spread.RangeGroupStateChangedEventArgs e)
        {
            listBox1.Items.Add("Changed");
        }

        private void fpSpread1_RangeGroupStateChanging(object sender, FarPoint.Win.Spread.RangeGroupStateChangingEventArgs e)
        {
            listBox1.Items.Add("Changing");
        }
fpSpread1.ActiveSheet.Rows.Count = 11
fpSpread1.ActiveSheet.Columns.Count = 6
Dim outlinelook As New FarPoint.Win.Spread.EnhancedInterfaceRenderer
outlinelook.RangeGroupBackgroundColor = Color.LightGreen
outlinelook.RangeGroupButtonBorderColor = Color.Red
outlinelook.RangeGroupLineColor = Color.Blue
fpSpread1.InterfaceRenderer = outlinelook
fpSpread1.ActiveSheet.AddRangeGroup(0, 8, True)
fpSpread1.ActiveSheet.AddRangeGroup(0, 5, True)
fpSpread1.ActiveSheet.AddRangeGroup(1, 3, False)
fpSpread1.ActiveSheet.AddRangeGroup(1, 2, False)

Private Sub fpSpread1_RangeGroupStateChanged(sender As Object, e As FarPoint.Win.Spread.RangeGroupStateChangedEventArgs) Handles fpSpread1.RangeGroupStateChanged
        ListBox1.Items.Add("Changed")
    End Sub

    Private Sub fpSpread1_RangeGroupStateChanging(sender As Object, e As FarPoint.Win.Spread.RangeGroupStateChangingEventArgs) Handles fpSpread1.RangeGroupStateChanging
        ListBox1.Items.Add("Changing")
    End Sub
See Also