Spread Windows Forms 6.0 Product Documentation
View Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > RangeGroupStateChangingEventArgs Class : View Property


Glossary Item Box

Gets the view that contains the outline (range group) whose state is changing.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property View As SpreadView
Visual Basic (Usage)Copy Code
Dim instance As RangeGroupStateChangingEventArgs
Dim value As SpreadView
 
value = instance.View
C# 
public SpreadView View {get;}

Example

This example changes the color of the group background.
C#Copy Code
fpSpread1.ActiveSheet.AddRangeGroup(0, 20, true);
fpSpread1.ActiveSheet.AddRangeGroup(0, 10, true);
fpSpread1.ActiveSheet.AddRangeGroup(0, 5, true);
fpSpread1.ActiveSheet.RangeGroupBackGroundColor = Color.Yellow;
fpSpread1.ActiveSheet.RangeGroupButtonStyle = FarPoint.Win.Spread.RangeGroupButtonStyle.Enhanced;

private void fpSpread1_RangeGroupStateChanging(object sender, FarPoint.Win.Spread.RangeGroupStateChangingEventArgs e) {
if (e.IsRowGroup == true) 
{
if ((e.RangeGroupInfo().Start == 0)) 
{
e.View.Sheets(e.View.ActiveSheetIndex).RangeGroupBackGroundColor = Color.Goldenrod;
}
}
}
Visual BasicCopy Code
FpSpread1.ActiveSheet.AddRangeGroup(0, 20, True)
FpSpread1.ActiveSheet.AddRangeGroup(0, 10, True)
FpSpread1.ActiveSheet.AddRangeGroup(0, 5, True)
FpSpread1.ActiveSheet.RangeGroupBackGroundColor = Color.Yellow
FpSpread1.ActiveSheet.RangeGroupButtonStyle = FarPoint.Win.Spread.RangeGroupButtonStyle.Enhanced

Private Sub FpSpread1_RangeGroupStateChanging(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.RangeGroupStateChangingEventArgs)
Handles FpSpread1.RangeGroupStateChanging
If e.IsRowGroup = True Then
If e.RangeGroupInfo().Start = 0 Then
e.View.Sheets(e.View.ActiveSheetIndex).RangeGroupBackGroundColor = Color.Goldenrod
End If
End If
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.