Spread for ASP.NET 10 Product Documentation
Using Spread with Visual Studio 2012 and the SQL Data Source

Later versions of Visual Studio have data source controls that require fewer steps. This list of steps uses the SQLDataSource control to bind the Spread control.

  1. Start a new Visual Studio .NET project.
  2. Name the project databind.
  3. Name the form in the project binding.aspx.
  4. Add the FpSpread component to your project.
  5. Place the component on the form.
  6. If the Toolbox is not displayed, choose Toolbox from the View menu.
  7. Double-click the SqlDataSource control (under the Data section in the toolbox) to place it on the form.
  8. Select Configure Data Source in the pop-up menu. Select New Connection.
  9. Choose Microsoft Access Database File in the Choose Data Source dialog.
  10. Browse to the data file. Select the fpnorthwinds.mdb file installed in the Spread Studio\Common folder. Click Next.
  11. Choose whether to save the connection string in the application configuration file.
  12. Select Specify columns from a table or view (or use a stored procedure).
  13. Select Customers under the Name: drop-down.
  14. Select ContactName and Phone in the Columns: section.
  15. Select Next and Finish. The Test Query button can be used to test the connection before selecting Finish.
  16. Bind the data source to Spread by adding the following code to the form:
    C#
    Copy Code
    FpSpread1.DataSource = SqlDataSource1;
    
    Visual Basic
    Copy Code
    FpSpread1.DataSource = SqlDataSource1
    
  17. Run the project to see the results.

If you do not know how to add the FpSpread component to the project, complete the steps in Adding Spread to a Project

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback