Spread for ASP.NET 8.0 Product Documentation
DefaultStyleName Property (SheetView)
Example 


Gets or sets the name of the default style for the cells in this sheet.
Syntax
'Declaration
 
Public Property DefaultStyleName As String
'Usage
 
Dim instance As SheetView
Dim value As String
 
instance.DefaultStyleName = value
 
value = instance.DefaultStyleName
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.
FarPoint.Web.Spread.SheetView sv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.NamedStyle dnstyle=new FarPoint.Web.Spread.NamedStyle();
dnstyle.Name="fpstyle";
dnstyle.BackColor=Color.Yellow;
FpSpread1.NamedStyles.Add(dnstyle);
sv.DefaultStyleName=dnstyle.Name;
Dim sv As FarPoint.Web.Spread.SheetView
Dim dnstyle As New FarPoint.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 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

SheetView Class
SheetView Members
NamedStyle Class
NamedStyleCollection Class

User-Task Documentation

Styles for Cells

 

 


Copyright © GrapeCity, inc. All rights reserved.