Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 3.1 KB

File metadata and controls

38 lines (24 loc) · 3.1 KB

WPF Spreadsheet - How to Bind a Spreadsheet to an MS SQL Server Database

This example demonstrates how to bind a cell range on a worksheet to the sample Northwind database to load data from the Suppliers data table.

image

Implementation Details

To accomplish this task, call the WorksheetDataBindingCollection.BindToDataSource method.

This application also enables users to add, modify or remove data in a data table. They can use the corresponding buttons on the File tab, in the Database group to edit the data and save their changes back to the database.

To insert new rows, a data entry form is used. The user should fill out given data entry fields and click the Save cell to add a new record to the Suppliers data table. Clicking the Apply Changes button posts the updated data back to the database. To remove a record, the user should select the required Suppliers row on the worksheet and click the Remove Record button. The Delete dialog will be invoked asking the user to confirm the delete operation.

To send the modified data to the connected database, the Update method of the SuppliersTableAdapter is used.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)