Back to Devexpress

WorksheetDataBindingCollection.CreateDataSource(CellRange, RangeDataSourceOptions) Method

officefileapi-devexpress-dot-spreadsheet-dot-worksheetdatabindingcollection-dot-createdatasource-x28-devexpress-dot-spreadsheet-dot-cellrange-devexpress-dot-spreadsheet-dot-rangedatasourceoptions-x29.md

latest2.7 KB
Original Source

WorksheetDataBindingCollection.CreateDataSource(CellRange, RangeDataSourceOptions) Method

Creates a new data source from the cell range.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
WorksheetDataBinding CreateDataSource(
    CellRange range,
    RangeDataSourceOptions options
)
vb
Function CreateDataSource(
    range As CellRange,
    options As RangeDataSourceOptions
) As WorksheetDataBinding

Parameters

NameTypeDescription
rangeCellRange

A CellRange that is the cell range used as the data source.

| | options | RangeDataSourceOptions |

A RangeDataSourceOptions object containing the data source options.

|

Returns

TypeDescription
WorksheetDataBinding

A WorksheetDataBinding object that contains information about the data source range.

|

Remarks

To use the returned WorksheetDataBinding instance as the data source, access its WorksheetDataBinding.DataSource property.

Another method that creates the data source from a worksheet range is the CellRange.GetDataSource method. It is equivalent to the CreateDataSource method, but operates with the CellRange instance.

See Also

WorksheetDataBindingCollection Interface

WorksheetDataBindingCollection Members

DevExpress.Spreadsheet Namespace