Spread for ASP.NET 10 Product Documentation
DefaultStyleName Property (SheetCorner)
Example 


Gets or sets the name of the default style for the sheet corner.
Syntax
'Declaration
 
Public Property DefaultStyleName As String
'Usage
 
Dim instance As SheetCorner
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 for the sheet corner
Exceptions
ExceptionDescription
System.ArgumentExceptionSpecified style (NamedStyle object) could not be found in the collection
Example
This example modifies the appearance of the sheet corner.
FarPoint.Web.Spread.Background bg = new FarPoint.Web.Spread.Background();
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg";
bg.BackgroundImageUrl = "picture/Image.bmp";
FpSpread1.SheetCorner.AlternatingRows.Count = 2;
FpSpread1.SheetCorner.AlternatingRows[0].BackColor = Color.Pink;
FpSpread1.SheetCorner.Cells[0, 0].Text = "Corner";
FpSpread1.SheetCorner.ColumnCount = 3;
FpSpread1.SheetCorner.RowCount = 3;
FpSpread1.SheetCorner.Columns[1].CellType = new FarPoint.Web.Spread.CheckBoxCellType();
FpSpread1.SheetCorner.Rows[1].Background = bg;
// Define the default style name.
FarPoint.Web.Spread.NamedStyle mnstyle = new FarPoint.Web.Spread.NamedStyle();
mnstyle.Name = "fpstyle";
mnstyle.BackColor = Color.Yellow;
FpSpread1.NamedStyles.Add(mnstyle);
FpSpread1.SheetCorner.DefaultStyleName = mnstyle.Name;
// Define the default style.
FarPoint.Web.Spread.StyleInfo mystyle = new FarPoint.Web.Spread.StyleInfo();
mystyle.BackColor = Color.Red;
FpSpread1.SheetCorner.DefaultStyle = mystyle;
Dim bg As New FarPoint.Web.Spread.Background()
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg"
bg.BackgroundImageUrl = "picture/Image.bmp"
FpSpread1.SheetCorner.AlternatingRows.Count = 2
FpSpread1.SheetCorner.AlternatingRows(0).BackColor = Color.Pink
FpSpread1.SheetCorner.Cells(0, 0).Text = "Corner"
FpSpread1.SheetCorner.ColumnCount = 3
FpSpread1.SheetCorner.RowCount = 3
FpSpread1.SheetCorner.Columns(1).CellType = New FarPoint.Web.Spread.CheckBoxCellType()
FpSpread1.SheetCorner.Rows(1).Background = bg
' Define the default style name.
Dim mnstyle As New FarPoint.Web.Spread.NamedStyle()
mnstyle.Name = "fpstyle"
mnstyle.BackColor = Color.Yellow
FpSpread1.NamedStyles.Add(mnstyle)
FpSpread1.SheetCorner.DefaultStyleName = mnstyle.Name
' Define the default style.
Dim mystyle As New FarPoint.Web.Spread.StyleInfo()
mystyle.BackColor = Color.Red
FpSpread1.SheetCorner.DefaultStyle = mystyle
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

SheetCorner Class
SheetCorner Members

 

 


Copyright © GrapeCity, inc. All rights reserved.