Spread Silverlight Documentation
Allowing Cell Overflow
Spread Silverlight 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.

Using Code

The following example allows text to overflow to the left, left and right, and to the right with the CanCellOverflow property.

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.Windows.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.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center;
gcSpreadSheet1.Sheets[0].Cells[3, 2].Value = "Data overflows to the right";
gcSpreadSheet1.Sheets[0].Cells[3, 2].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Left;
VB.NET
Copy Code
GcSpreadSheet1.CanCellOverflow = True
GcSpreadSheet1.Sheets(0).Cells(1, 2).Value = "Data overflows to the left and right"
GcSpreadSheet1.Sheets(0).Cells(1, 2).HorizontalAlignment = GrapeCity.Windows.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.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center
GcSpreadSheet1.Sheets(0).Cells(3, 2).Value = "Data overflows to the right"
GcSpreadSheet1.Sheets(0).Cells(3, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Left
See Also