Skip to main content
A newer version of this page is available. .

UnboundSource Class

A data source used to supply and obtain a typed list of objects to data-aware controls in unbound mode.

Namespace: DevExpress.Data

Assembly: DevExpress.Data.v18.1.dll

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.UnboundDataSource.bmp")]
[ToolboxTabName("DX.18.1: Data & Analytics")]
public class UnboundSource :
    Component,
    IListSource,
    ISupportInitialize

Remarks

To use the UnboundSource component, drag it to the form from the DX.18.1: Data & Analytics tab of the Visual Studio Toolbox. You can also add and configure an UnboundSource with the Data Source Configuration Wizard.

UnboundSource_Wizard

To setup the UnboundSource‘s list and its columns, use the UnboundSource.Properties property.

UnboundSource_Properties

Handle the UnboundSource.ValueNeeded and UnboundSource.ValuePushed events to obtain data from your data storage and save modified data back.


unboundSource1.ValueNeeded+= unboundSource1_ValueNeeded;
unboundSource1.ValuePushed+= unboundSource1_ValuePushed;
//...
void unboundSource1_ValueNeeded(object sender, DevExpress.Data.UnboundSourceValueNeededEventArgs e) {
    e.Value = something; /* Assign the real data here.*/
}
void unboundSource1_ValuePushed(object sender, DevExpress.Data.UnboundSourceValuePushedEventArgs e) {
    something = e.Value; /* Propagate the value into the storage.*/
}

Use the UnboundSource methods (UnboundSource.Add, UnboundSource.Move, UnboundSource.InsertAt, UnboundSource.RemoveAt, etc.) to notify the bound control that the data is changed.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UnboundSource class.

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.

Inheritance

See Also