Spread Silverlight Documentation
SetStyleName(Int32,Int32,SheetArea,String) Method
Example 


The row index of the cell in the model, or -1 to specify a column or default model.
The column index of the cell in the model, or -1 to specify a row or default model.
The sheet area.
The name of the style to set.
Sets the style for the specified cell, column, row, or default model to the specified style name.
Syntax
'Declaration
 
Public Overloads Sub SetStyleName( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal sheetArea As SheetArea, _
   ByVal value As System.String _
) 
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim sheetArea As SheetArea
Dim value As System.String
 
instance.SetStyleName(row, column, sheetArea, value)
public void SetStyleName( 
   System.int row,
   System.int column,
   SheetArea sheetArea,
   System.string value
)

Parameters

row
The row index of the cell in the model, or -1 to specify a column or default model.
column
The column index of the cell in the model, or -1 to specify a row or default model.
sheetArea
The sheet area.
value
The name of the style to set.
Example
This example uses the SetStyleName method.
GrapeCity.Windows.SpreadSheet.Data.StyleInfo aaa = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo();
aaa.Background = new SolidColorBrush(System.Windows.Media.Colors.Green);
aaa.Name = "aaa";
gcSpreadSheet1.Sheets[0].NamedStyles.Add(aaa);
gcSpreadSheet1.Sheets[0].SetStyleName(0, 0, "aaa");
//gcSpreadSheet1.Sheets[0].SetStyleName(0, 0, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "aaa");
Dim aaa As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo()
aaa.Background = New SolidColorBrush(System.Windows.Media.Colors.Green)
aaa.Name = "aaa"
GcSpreadSheet1.Sheets(0).NamedStyles.Add(aaa)
GcSpreadSheet1.Sheets(0).SetStyleName(0, 0, "aaa")
'GcSpreadSheet1.Sheets(0).SetStyleName(0, 0, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, "aaa")
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.