Allowing Cell Overflow
Spread WinRT Documentation > Developer's Guide > Customizing the Appearance > Allowing Cell Overflow

You can determine how the contents of a cell overflows into adjoining cells. If you allow cell contents to overflow:

Data only overflows if the adjacent cell is empty. Merged cells do not display the overflow.

Set the CanCellOverflow property to true to allow the cell to overflow.

Using Code

This example allows overflow and sets the alignment.

CS
Copy Code
gcSpreadSheet1.CanCellOverflow = true;
gcSpreadSheet1.Sheets[0].Cells[1, 2].Value = "Data overflows to the left";
gcSpreadSheet1.Sheets[0].Cells[1, 2].HorizontalAlignment = GrapeCity.Xaml.SpreadSheet.Data.CellHorizontalAlignment.Right;
gcSpreadSheet1.Sheets[0].Cells[2, 2].Value = "Data overflows to the left and right";
gcSpreadSheet1.Sheets[0].Cells[2, 2].HorizontalAlignment = GrapeCity.Xaml.SpreadSheet.Data.CellHorizontalAlignment.Center;
gcSpreadSheet1.Sheets[0].Cells[3, 2].Value = "Data overflows to the right";
gcSpreadSheet1.Sheets[0].Cells[3, 2].HorizontalAlignment = GrapeCity.Xaml.SpreadSheet.Data.CellHorizontalAlignment.Left;
VB
Copy Code
GcSpreadSheet1.CanCellOverflow = True
GcSpreadSheet1.Sheets(0).Cells(1, 2).Value = "Data overflows to the left"
GcSpreadSheet1.Sheets(0).Cells(1, 2).HorizontalAlignment = GrapeCity.Xaml.SpreadSheet.Data.CellHorizontalAlignment.Right
GcSpreadSheet1.Sheets(0).Cells(2, 2).Value = "Data overflows to the left and right"
GcSpreadSheet1.Sheets(0).Cells(2, 2).HorizontalAlignment = GrapeCity.Xaml.SpreadSheet.Data.CellHorizontalAlignment.Center
GcSpreadSheet1.Sheets(0).Cells(3, 2).Value = "Data overflows to the right"
GcSpreadSheet1.Sheets(0).Cells(3, 2).HorizontalAlignment = GrapeCity.Xaml.SpreadSheet.Data.CellHorizontalAlignment.Left
See Also