Skip to main content Skip to footer

GrapeCity Spread Silverlight CTP, Part 3 Borders and Grid Lines

Spread CTP - Script 3: Borders and Grid Lines

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

This is the 3rd in a series of Spread CTP Blogs and is a continuation of:

Part 1 - Create an app from scratch
Part 2 – AutoFit

You can set the color or line style of the border around the cells, columns, or rows. You can also specify the color and whether to show grid lines. Use the SetBorder method to set a border. The ShowGridLine and GridLineColor properties can be used to make changes to the horizontal and vertical grid lines in the control.

The following image displays a border around a cell range.

clip_image001

Using Code

CS

GrapeCity.Windows.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(1, 1, 2, 2);
gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromArgb(225, 225, 100, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
gcSpreadSheet1.Invalidate();

VB.NET

Dim r As New GrapeCity.Windows.SpreadSheet.Data.CellRange(2, 2, 2, 2)
GcSpreadSheet1.Sheets(0).SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromArgb(225, 225, 100, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All)

Next part Cell Format

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

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

MESCIUS inc.

comments powered by Disqus