Data Moving Plug-in: Queries

<< Back to Data Moving Plug-in Main Features

All Data Moving Plug-in controls may be enhanced with sorting, filtering, and paging capabilities. It is enough to declare the use of a retrievalManager in the fluent interface, to add a pager column in some toolbar, and to declare the columns to be sorted and filtered.

There are basically four types of retrievalManagers:

  1. Submit based. When the user changes someway the “current query”, for instance, by changing a filter condition, or by changing page, a dynamic form is created, filled with adequate input fields that specify all query information, and submitted. The action method receives a QueryViewModel object that can be applied to any IQueryable, or IEnumerable. This retrievalManager is the only one that can be used with Server Controls.
  2. Ajax based. When the user changes someway the “current query”, for instance by changing a filter condition, or by changing page, an ajax post with the query information is issued to the server. The action method receives a QueryViewModel object that can be applied to any IQueryable, or IEnumerable. The Action method is expected to return json data.
  3. WebApi based. When the user changes someway the “current query”, for instance by changing a filter condition, or by changing page, an oData query is issued to a WebApi controller.
  4. Javascript retrievalManager. It queries a local javascript array.

 

An example showing the use of queries with both Clent and Server controls is here.

A javascript retrievalManager is used in this example.