Skip to main content

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.v24.2.dll

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.UnboundDataSource.bmp")]
public class UnboundSource :
    Component,
    IListSource,
    ISupportInitialize

Remarks

To use the UnboundSource component, drag it to the form from the DX.24.2: 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.

Inheritance

See Also