GrapeCity.Xaml.SpreadSheet.Data
GetStyleName(Int32,Int32) Method
Example 


The row index of the cell in the model, or -1 to specify an entire column or the default model.
The column index of the cell in the model, or -1 to specify an entire row or the default model.
Gets the name of the style assigned to a cell, column, row, or default model in the specified sheet area.
Syntax
'Declaration
 
Public Overloads Function GetStyleName( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As String
'Usage
 
Dim instance As Worksheet
Dim row As Integer
Dim column As Integer
Dim value As String
 
value = instance.GetStyleName(row, column)
public string GetStyleName( 
   int row,
   int column
)

Parameters

row
The row index of the cell in the model, or -1 to specify an entire column or the default model.
column
The column index of the cell in the model, or -1 to specify an entire row or the default model.

Return Value

Returns the name string for the style.
Example
This example uses the GetStyleName method.
var style = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
style.Background = new SolidColorBrush(Windows.UI.Colors.Blue);
style.Name = "CellStyle";
gcSpreadSheet1.Sheets[0].NamedStyles.Add(style);
gcSpreadSheet1.Sheets[0].Cells[0, 0].StyleName = "CellStyle";
listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetStyleInfo(0, 0).Name.ToString());
listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetStyleInfo(0,0,GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells).Background.ToString());
listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetStyleName(0, 0).ToString());
listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetStyleName(0, 0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells).ToString());
Dim style As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
style.Background = New SolidColorBrush(Windows.UI.Colors.Blue)
style.Name = "CellStyle"
GcSpreadSheet1.Sheets(0).NamedStyles.Add(style)
GcSpreadSheet1.Sheets(0).Cells(0, 0).StyleName = "CellStyle"
ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).GetStyleInfo(0, 0).Name.ToString())
ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).GetStyleInfo(0, 0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells).Background.ToString())
ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).GetStyleName(0, 0).ToString())
ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).GetStyleName(0, 0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells).ToString())
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options