# DataSource Binding

The Spreadsheet component supports binding individual sheets to a [DataSource](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/datasource/overview) instance that allows you to load data from a remote endpoint into the Spreadsheet and edit it.  

For a runnable example, refer to the demo on [binding the Spreadsheet component to a DataSource](https://demos.telerik.com/aspnet-mvc/spreadsheet/datasource). The Spreadsheet DataSource from that demo uses the [`read`](https://docs.telerik.com/kendo-ui/api/data/datasource/configuration/transport.read) and [`submit`](https://docs.telerik.com/kendo-ui/api/data/datasource/configuration/transport.submit) transport options. The `submit` option is required to handle a scenario where the user creates, updates, and deletes items simultaneously.

When using separate [`create`](https://docs.telerik.com/kendo-ui/api/data/datasource/configuration/transport.create), [`update`](https://docs.telerik.com/kendo-ui/api/data/datasource/configuration/transport.update), and [`destroy`](https://docs.telerik.com/kendo-ui/api/data/datasource/configuration/transport.destroy) handlers, one can fail while the others do not. That will result in a mismatch of the data state between the client (the Spreadsheet) and the remote source. The `submit` option handles all operations through a single request. The operation will not save any changes if a specified record is invalid.

## Specific Behavior

The DataSource binding switches the sheet to a special data-bound mode. It differs from the standard behavior in the following ways:

* Column headers are inferred from the data item fields. Configure the column headers and ordering by using the [`setDataSource()`](https://docs.telerik.com/kendo-ui/api/spreadsheet/sheet/methods/setdatasource) method of the sheet.
* Cell styles, formulas, and formats are not persisted in the DataSource.
* Row height and column width are not persisted in the DataSource.
* Sorting and filtering are applied locally.

The CRUD data operations are also handled in a specific way:

* Inserted rows are always appended at the end, regardless of the actual row index.
* Updating cell content translates into `update` operations.
* Deleting rows translates into `destroy` operations.
* Inserting and removing columns is not supported.

## Unsupported Scenarios

* The [`Sheet`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/spreadsheetsheetbuilder) cannot be bound to a DataSource that does not contain any items because the header row in the sheet is generated based on the data item fields.
* The records cannot be edited after sorting the sheet ([a feature request](https://feedback.telerik.com/kendo-jquery-ui/1402815-allow-sorting-for-spreadsheet-with-datasource)).
* The records cannot be edited after filtering the sheet ([a feature request](https://feedback.telerik.com/kendo-jquery-ui/1402817-allow-filtering-for-spreadsheet-with-datasource)).

## See Also

* [Exporting the Spreadsheet to Excel](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/import-and-export-data/export-to-excel)

* [Client-Side API of the Spreadsheet](https://docs.telerik.com/kendo-ui/api/ui/spreadsheet)

* [Server-Side HtmlHelper API of the Spreadsheet](https://www.telerik.com/aspnet-mvc/documentation/api/spreadsheet)
