Skip to main content Skip to footer

GrapeCity Spread Silverlight CTP, Create app from scratch - Part 1

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

This is a first in a multi part series on the new recently announced version of the Community Technology Preview of Spread WPF-Silverlight.

Spread CTP Overview:

Spread Silverlight is a comprehensive spreadsheet component for Silverlight applications that combines grid capabilities and spreadsheet functionality. Cross-sheet referencing allows calculations to make use of data and formulas on a variety of sheets.

The GcSpreadSheet component may be dropped on a Silverlight Form and customized for a range of applications. You can customize the appearance and the user interaction in a variety of ways. With a built-in Designer, you can quickly create a prototype or customize your finished design.

Import and export capabilities provide another source of flexibility when developing and exchanging designs. Spread Silverlight can handle data from text files as well as multiple spreadsheets from Microsoft Excel files.

The GcSpreadSheet control consists of a workbook that contains a collection of worksheets. The worksheet contains information about a sheet and has column header, row header, column footer, and viewport sections.

GcSpreadSheet is a top level control that contains a workbook instance and a GcSpreadView instance. The workbook is used to manage the control state and the GcSpreadView is used to implement the UI behavior.

The GcSpreadView object controls the layout and event handling.

The GcSpreadView object contains the GcHeaderCornerViewport, GcColumnHeaderViewport, GcRowHeaderViewport, GcViewport, scrollbars, split box, split bar, and tabs.

The GcSpreadView object displays a range of cells and contains a list of GcRows. GcRow contains a list of GcCells. The GcViewport object manages creating, caching, and displaying the GcRow objects.

Feature Overview:

Spread Silverlight supports many features. The main features are listed below and will be discussed in subsequent blogs:

· AutoFit

· Borders and Grid Lines

· Cell Format

· Cell Overflow

· Cell Span

· Clipboard Operation

· Conditional Formatting

· CSV Import and Export

· Data Binding

· Drag and Move

· Drag Fill

· Edit Mode Always

· Frozen Columns and Rows

· Row Filter

Create App from scratch…

If you are new to the Silverlight platform, you might be unfamiliar with how to start a new project using a component. To use the Spread Silverlight product, you need to add the component to a project in Visual Studio.

The first step is to create a new project in Visual Studio, and to add a Spread Silverlight component to the project.

1. Start Visual Studio.

2. From the File menu, choose New, Project.

3. In the New Project dialog, select a project type depending on the language environment in which you are developing.

4. Select Silverlight under Visual Basic or Visual C# in the Installed Templates section.

5. Choose Silverlight Application in the project type area.

6. In the Name box, type the name of the new project.

7. In the Location box, type the path to save the project to.

8. In the Solution Name box, type the solution name of the new project.

9. Click OK.

clip_image002

The next step is to add the GcSpreadSheet component to the tool box. This only has to be done once.

10. If the Toolbox is not displayed, from the View menu choose Toolbox.

11. Once the Toolbox is displayed, look in the GrapeCity Spread category (or in any other category if you have installed Spread and placed the toolbox icon in a different category).

12. If the GcSpread component is not in the Toolbox, right-click in the Toolbox, and from the pop-up menu select Choose Items.

13. In the Customize Toolbox dialog, click the Silverlight Components tab.

14. In the Silverlight Components tab, the GcSpreadSheet component (in the GrapeCity.Silverlight.SpreadSheet.UI namespace) should be displayed in the list of components. Select the GcSpreadSheet component check box and click OK.

If the GcSpreadSheet component is not displayed in the list of components, click Browse and browse to the installation path for the Spread Silverlight component. Once there, select the GrapeCity.Silverlight.SpreadSheet.UI.dll and click Open. The GcSpreadSheet component is now displayed in the list of components.

15. You can test that the component has been added by opening a project and inserting the component.

The next step is to add the GcSpreadSheet component to a project.

16. With an open project, in the Toolbox, select the GcSpreadSheet component.

17. On your Main Window page, draw a GcSpreadSheet component by dragging a rectangle the size that you would like the initial component or simply double click on the page. The GcSpreadSheet component appears.

clip_image004

18. Run the app and you have your first Silverlight Spread Sheet.

clip_image005

Part 2 will be on AutoFit

Technorati Tags: Spread,Excel,Silverlight,CTP,labs@grapecity.com,visual studio

tweetmeme_url = 'http://www.clubfarpoint.com/Forums/blogs/russells\_blog/archive/2012/03/26/grapecity-spread-silverlight-ctp-create-app-from-scratch-part-1.aspx'; tweetmeme_source = '@russcamtv'; tweetmeme_hashtags = '#appdev';

MESCIUS inc.

comments powered by Disqus