GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > GetStyleInfo Method : GetStyleInfo(Int32,Int32,SheetArea) Method |
'Declaration Public Overloads Overridable Function GetStyleInfo( _ ByVal row As System.Integer, _ ByVal column As System.Integer, _ ByVal sheetArea As SheetArea _ ) As StyleInfo
Exception | Description |
---|---|
System.ArgumentException | The sheet area cannot be found. |
System.IndexOutOfRangeException | The row index must be between 0 and the row count of the block. |
System.IndexOutOfRangeException | The column index must be between 0 and the column count of the block. |
var style = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo(); style.Background = new SolidColorBrush(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.Windows.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.Windows.SpreadSheet.Data.SheetArea.Cells).ToString());
Dim style As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo() style.Background = New SolidColorBrush(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.Windows.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.Windows.SpreadSheet.Data.SheetArea.Cells).ToString())
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)