Spread for ASP.NET 9.0 Product Documentation
NamedStyles Property (FpSpread)
Example 


Gets a collection of styles for the Spread component.
Syntax
'Declaration
 
Public ReadOnly Property NamedStyles As NamedStyleCollection
'Usage
 
Dim instance As FpSpread
Dim value As NamedStyleCollection
 
value = instance.NamedStyles
public NamedStyleCollection NamedStyles {get;}

Property Value

NamedStyleCollection containing the styles
Remarks
By default, this collection is shared between all sheets and style models in the component. When set, all style models that implement the INamedStyleSupport interface in the sheet are updated to reference the new collection.
Example
This example creates two objects for the spreadsheet, a ColumnHeader and a NamedStyle. The NamedStyles background color is set to yellow, and is then applied to the ColumnHeader object, resulting in all the column headers having a background color of yellow.
FarPoint.Web.Spread.ColumnHeader colhdr;
FarPoint.Web.Spread.NamedStylemn style=new FarPoint.Web.Spread.NamedStyle();
mnstyle.Name="fpstyle";
mnstyle.BackColor=Color.Yellow;
FpSpread1.NamedStyles.Add(mnstyle);
colhdr=FpSpread1.ActiveSheetView.ColumnHeader;
colhdr.DefaultStyleName=mnstyle.Name;
Dim colhdr As FarPoint.Web.Spread.ColumnHeader
Dim mnstyle As New FarPoint.Web.Spread.NamedStyle()
mnstyle.Name="fpstyle"
mnstyle.BackColor=Color.Yellow
FpSpread1.NamedStyles.Add(mnstyle)
colhdr=FpSpread1.ActiveSheetView.ColumnHeader
colhdr.DefaultStyleName=mnstyle.Name
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FpSpread Class
FpSpread Members
NamedStyle Class
NamedStyleCollection Class

User-Task Documentation

Style for Cells

 

 


Copyright © GrapeCity, inc. All rights reserved.