Skip to main content
All docs
V19.1
.NET Framework 4.5.2+
Row

WorksheetDataBindingCollection.GetDataBindings(Range) Method

Obtains data bindings for the cells in the specified range.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

IList<WorksheetDataBinding> GetDataBindings(
    Range range
)

Parameters

Name Type Description
range Range

A Range 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

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(Range) 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