Skip to main content
Row

WorksheetDataBindingCollection.GetDataBindings(CellRange) Method

Obtains data bindings for the cells in the specified range.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

IList<WorksheetDataBinding> GetDataBindings(
    CellRange range
)

Parameters

Name Type Description
range CellRange

A CellRange of cells in a worksheet.

Returns

Type Description
IList<WorksheetDataBinding>

A IList<T><WorksheetDataBinding,> generic list .

Remarks

To get the data binding for a particular cell, use the WorksheetDataBindingCollection.GetDataBinding method.

Example

View Example

Worksheet sheet = spreadsheetControl1.Document.Worksheets.ActiveWorksheet;
var bindings = sheet.DataBindings.GetDataBindings(sheet.Selection);
string s = "No data bindings found";
if (bindings.Count != 0) { 
      s = "The selected range contains the following data bindings:\r\n";
foreach (WorksheetDataBinding binding in bindings)
    s += String.Format("Binding {0}\r\n", binding.Range);
}
MessageBox.Show(s);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetDataBindings(CellRange) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also