Skip to main content Skip to footer

GrapeCity Spread Silverlight CTP, Part 5 - Cell Overflow

Spread CTP - Script 5: Cell Format

If you are interested in downloading the Spread CTP, please email labs@grapecity.com .

This is the 5th in a series of Spread CTP Blogs and is a continuation of:

Part 1 : Create an app from scratch
Part 2 : AutoFit
Part 3 : Borders and Grid Lines
Part 4 : Cell Format

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

· Left-aligned text in a cell overflows to the adjacent right cell.

· Right-aligned text in a cell overflows to the adjacent left cell.

· Centered text in a cell overflows to both the left and right adjacent cells.

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

clip_image001

Using Code

CS

gcSpreadSheet1.AllowCellOverflow = true;
gcSpreadSheet1.Sheets[0].Cells[1, 2].Value = "Data Flows to the Left";

gcSpreadSheet1.Sheets[0].Cells[2, 2].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center;

gcSpreadSheet1.Sheets[0].Cells[2, 2].Value = "Data Flows to the Left and Right";

gcSpreadSheet1.Sheets[0].Cells[3, 2].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Left;

gcSpreadSheet1.Sheets[0].Cells[3, 2].Value = "Data Flows to the Right";

VB.NET

GcSpreadSheet1.AllowCellOverflow = True
GcSpreadSheet1.Sheets(0).Cells(1, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right
GcSpreadSheet1.Sheets(0).Cells(2, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center
GcSpreadSheet1.Sheets(0).Cells(3, 2).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Left

clip_image002

next : Part 6 – Cell Span

Technorati Tags: Spread,Excel,Silverlight,CTP,labs@grapecity.com,visual studio,AutoFit,borders and Grid lines,cell format,cell overflow.

tweetmeme_url = 'http://www.clubfarpoint.com/Forums/blogs/russells\_blog/archive/2012/03/27/grapecity-spread-silverlight-ctp-part-5-cell-overflow.aspx'; tweetmeme_source = '@russcamtv'; tweetmeme_hashtags = '#appdev';

MESCIUS inc.

comments powered by Disqus