Skip to main content

ODataInstantFeedbackSource Class

The data source for the GridControl and SearchLookUpEdit controls that binds these controls to OData service in Instant Feedback Mode.

Namespace: DevExpress.Data.ODataLinq

Assembly: DevExpress.Data.v23.2.dll

NuGet Package: DevExpress.Data

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.ODataInstantFeedbackSource.bmp")]
public class ODataInstantFeedbackSource :
    Component,
    IListSource,
    IDXCloneable,
    IOdata

Remarks

The ODataInstantFeedbackSource is a read-only data source for the Instant Feedback Mode.

Instant Feedback Mode

Instant Feedback binding mode is an improvement over regular server mode.

In server mode, the Grid Control loads data in small portions and delegates all data operations (sorting, grouping, filtering and calculating summaries) to the data server. This is the key to the server mode’s high efficiency when working with large volumes of data. The only drawback to using server mode involves data operations when the connection to the server is slow. In this instance, the bound control freezes until the data server completes operations and retrieves results.

With Instant Feedback binding mode, data operations are performed asynchronously in a background thread, and both the bound control and the application remain highly responsive. Currently, this mode is supported by the GridControl and SearchLookUpEdit controls.

For additional information on Instant Feedback mode, refer to the following help topic: Large Data Sources: Server and Instant Feedback Modes.

Sample Code

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

Note

A BadRequestException that occurs when data is being sorted, counted, etc., may be caused by the breaking change in Web API OData V6.0.0. For details, refer to the Global Query Setting section in the OData Web API documentation.

One-Click Solution for CRUD Web API Services with Role-Based Access Control Using EF Core and XPO

If you target .NET for your backend API, be sure to check out our free Web API Service and register your FREE copy today. The Solution Wizard scaffolds an OData v4 Web API Service (.NET 6+) with integrated authorization & CRUD operations powered by EF Core and our XPO ORM library. You can use OAuth2, JWT or custom authentication strategies alongside tools like Postman or Swagger (OpenAPI) for API testing.

Among its numerous capabilities, our built-in Web API Service filters out secured server data based on permissions granted to users. Advanced/enterprise functions include audit trail, endpoints to download reports, file attachments, check validation, obtain localized captions, etc.

To use the free Solution Wizard (which creates the Web API Service) run the Universal Component Installer from the DevExpress Download Manager.

Inheritance

Object
MarshalByRefObject
Component
ODataInstantFeedbackSource
See Also