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

Virtual Sources Overview

  • 2 minutes to read

Binding to any Data Source

You can connect the GridControl to any data source: REST Services, NoSQL Databases, Custom WCF Services, EntityFramework or any other ORM.

VirtualSourcesBindingToAnyData

Virtual Sources Types

The table below shows virtual sources grouped by type:

Regular Sources Async Sources
Infinite Sources InfiniteSource InfiniteAsyncSource
Paged Sources PagedSource PagedAsyncSource

Refer to the following topics to learn more:

Minimum Requirement

A data source needs to expose an API to fetch portions of data consecutively (for example, Skip and Take or fetch a certain data page by page index). Total item count is not required; sorting, filtering, and summary calculation operations are optional.

Enabling Features

The GridControl bound to a virtual source only requests the top records or a certain page. You can specify which data operations are allowed, for example, an end-user can sort by columns A, C, and D, and the Search Panel can filter data by the StartsWith criteria.

You can control requests that the GridControl sends to a service or database. This prevents overloading the database with non-optimal queries. The GridControl automatically hides all UI elements for non-supported operations.

Refer to the Virtual Sources Limitations topic to learn more.

MVVM Support

Virtual sources require handling events to load data and perform data operations like sorting, filtering, etc. You should create and configure them in code no matter what pattern you follow.

Virtual sources are designed to be a part of View (see Examples). However, you can implement data operations at the View Model level with the following approaches:

  • In event handlers, transform source-specific objects (SortDefinition, SummaryDefinition, CriteriaOperator, etc.) into objects accepted by your View Model and invoke corresponding View Model methods.
  • If your View Model can work with source-specific objects, create a virtual source at the View Model level and handle the source events there.