Spread ASP.NET 6.0 Product Documentation
DefaultStyleName Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : DefaultStyleName Property


Glossary Item Box

Gets or sets the name of the default style for the cells in this sheet.

Syntax

Visual Basic (Declaration) 
Public Property DefaultStyleName As String
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As String
 
instance.DefaultStyleName = value
 
value = instance.DefaultStyleName
C# 
public string DefaultStyleName {get; set;}

Property Value

String containing the name of the default style

Remarks

To create named styles for the component, use the NamedStyleCollection or NamedStyle class.

Example

This example creates a NamedStyle object, sets it Name and BackColor properties and assigns it to the SheetView object. As a result, all the cells in the active sheet are yellow.
C#Copy Code
FarPoint.Web.Spread.SheetViewsv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.NamedStylednstyle=newFarPoint.Web.Spread.NamedStyle();
dnstyle.Name="fpstyle";
dnstyle.BackColor=Color.Yellow;
FpSpread1.NamedStyles.Add(dnstyle);
sv.DefaultStyleName=dnstyle.Name;
Visual BasicCopy Code
DimsvAsFarPoint.Web.Spread.SheetView
DimdnstyleAsNewFarPoint.Web.Spread.NamedStyle()
sv=FpSpread1.ActiveSheetView
dnstyle.Name="fpstyle"
dnstyle.BackColor=Color.Yellow
FpSpread1.NamedStyles.Add(dnstyle)
sv.DefaultStyleName=dnstyle.Name

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.