Skip to main content

ODataInstantFeedbackSource.GetSource Event

Occurs when the ODataInstantFeedbackSource needs a queryable source to retrieve objects from the OData service.

Namespace: DevExpress.Data.ODataLinq

Assembly: DevExpress.Data.v24.2.dll

Declaration

public event EventHandler<GetSourceEventArgs> GetSource

Event Data

The GetSource event's data class is GetSourceEventArgs. The following properties provide information specific to this event:

Property Description
AreSourceRowsThreadSafe Specifies whether elements retrieved by the ODataInstantFeedbackSource‘s queryable source are thread-safe.
Extender This property is intended for internal use.
KeyExpressions Gets or sets the name of the key property.
Properties
Query Specifies the query request to the OData service.
Tag Gets or sets an arbitrary object associated with a queryable source.

Remarks

Handle this event to supply a queryable source connected to the required OData service. The GetSourceEventArgs class exposes the GetSourceEventArgs.Tag property, which you can use to specify an arbitrary object. This object will be passed along with the GetSourceEventArgs.Query property to the ODataInstantFeedbackSource.DismissSource event handler.

public partial class Form1 : Form {
    private void Form1_Load(object sender, EventArgs e) {
        oDataInstantFeedbackSource1.KeyExpression = "CustomerID";
        oDataInstantFeedbackSource1.GetQueryable += oDataInstantFeedbackSource1_GetSource;
        gridControl1.DataSource = oDataInstantFeedbackSource1;
    }
    void oDataInstantFeedbackSource1_GetSource(object sender, GetSourceEventArgs e) {
        // DataServiceContext myDataServiceContext = ...
        e.Query = myDataServiceContext.Customers;
    }
}
See Also