Creating Cell Spans
Spread WinRT Documentation > Developer's Guide > Customizing the Appearance > Creating Cell Spans

You can create a cell span in the cell, row header, or column header area. You can also remove or clear cell spans.

The entire span is treated as an active cell when using the Tab key to move the active cell to the spanned cell. The active cell outline includes the entire span.

The following image displays a span in the cell and header areas:

You can use the AddSpanCellClearSpanCells, or RemoveSpanCell method in code.

Using Code

This example creates cell spans.

CS
Copy Code
GrapeCity.Xaml.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 3, 3);
gcSpreadSheet1.Sheets[0].AddSpanCell(r, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells);
gcSpreadSheet1.Sheets[0].RowHeader.ColumnCount = 2;
gcSpreadSheet1.Sheets[0].ColumnHeader.RowCount = 2;
GrapeCity.Xaml.SpreadSheet.Data.CellRange r2;
r2 = new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 2, 2);
gcSpreadSheet1.Sheets[0].AddSpanCell(r2, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.RowHeader);
VB
Copy Code
Dim r As GrapeCity.Xaml.SpreadSheet.Data.CellRange
r = New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 3, 3)
GcSpreadSheet1.Sheets(0).AddSpanCell(r, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells)
GcSpreadSheet1.Sheets(0).RowHeader.ColumnCount = 2
GcSpreadSheet1.Sheets(0).ColumnHeader.RowCount = 2
Dim r2 As GrapeCity.Xaml.SpreadSheet.Data.CellRange
r2 = New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 2, 2)
GcSpreadSheet1.Sheets(0).AddSpanCell(r2, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.RowHeader)
See Also