Spread WPF Documentation
ColumnCount Property (RowHeader)
Example 


Gets or sets the number of columns in the row header.
Syntax
'Declaration
 
<System.ComponentModel.DefaultValueAttribute()>
Public Property ColumnCount As System.Integer
'Usage
 
Dim instance As RowHeader
Dim value As System.Integer
 
instance.ColumnCount = value
 
value = instance.ColumnCount
[System.ComponentModel.DefaultValue()]
public System.int ColumnCount {get; set;}

Property Value

The number of columns in the row header. The default value is 1.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeException The specified column count is less than 0 or greater than 256.
Example
This example sets the ColumnCount property.
GrapeCity.Windows.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 3, 3);
gcSpreadSheet1.Sheets[0].AddSpanCell(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells);
//gcSpreadSheet1.Sheets[0].AddSpanCell(1, 1, 3, 3);
//gcSpreadSheet1.Sheets[0].AddSpanCell(4, 0, 2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells);

gcSpreadSheet1.Sheets[0].RowHeader.ColumnCount = 2;
gcSpreadSheet1.Sheets[0].ColumnHeader.RowCount = 2;
GrapeCity.Windows.SpreadSheet.Data.CellRange r2;
r2 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 2, 2);
gcSpreadSheet1.Sheets[0].AddSpanCell(r2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.RowHeader);
gcSpreadSheet1.Invalidate();
Dim r As GrapeCity.Windows.SpreadSheet.Data.CellRange
r = New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 3, 3)
GcSpreadSheet1.Sheets(0).AddSpanCell(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells)
' GcSpreadSheet1.Sheets(0).AddSpanCell(1, 1, 3, 3)
' GcSpreadSheet1.Sheets(0).AddSpanCell(4, 0, 2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells)
GcSpreadSheet1.Sheets(0).RowHeader.ColumnCount = 2
GcSpreadSheet1.Sheets(0).ColumnHeader.RowCount = 2
Dim r2 As GrapeCity.Windows.SpreadSheet.Data.CellRange
r2 = New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 2, 2)
GcSpreadSheet1.Sheets(0).AddSpanCell(r2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.RowHeader)
GcSpreadSheet1.Invalidate()
Requirements

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)

See Also

Reference

RowHeader Class
RowHeader Members

 

 


Copyright © GrapeCity, inc. All rights reserved.