Spread Windows Forms 10.0 Product Documentation
RangeGroupStateChanging Event
Example 


Occurs before the user changes the state of row or column outlines (range group).
Syntax
'Declaration
 
Public Event RangeGroupStateChanging As RangeGroupStateChangingEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As RangeGroupStateChangingEventHandler
 
AddHandler instance.RangeGroupStateChanging, handler
public event RangeGroupStateChangingEventHandler RangeGroupStateChanging
Event Data

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

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs)
IsRowGroupGets whether the outline (range group) is a group of rows.  
RangeGroupInfoGets the infomation about the outline (range group) whose state was changed.  
ViewGets the view that contains the outline (range group) whose state is changing.  
Example
This example uses the RangeGroupStateChanging 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
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FpSpread Class
FpSpread Members

 

 


Copyright © GrapeCity, inc. All rights reserved.