Virtual Sources Limitations
- 3 minutes to read
The GridControl bound to a virtual source only requests top records or a specific page. You can specify which data operations are supported to prevent end users from overloading the database with non-optimal queries. The GridControl hides the UI elements for non-supported operations.
Sorting
The Sorting feature is disabled by default.
To enable sorting:
- Fetch rows taking into account the GridControl‘s sorting using the FetchEventArgsBase.SortOrder property.
- Set the ColumnBase.AllowSorting property to true to allow sorting by specific column (the DataViewBase.AllowSorting property is ignored).
Refer to the Add Sorting topic to learn more.
You can sort by single column only initially. Set the GridViewBase.AllowGroupingSortingBySingleColumnOnly property to false to allow sorting by multiple column.
Filtering
The Filtering feature is disabled by default.
To enable filtering:
- Fetch rows taking into account the GridControl‘s filtering using the FetchEventArgsBase.Filter property.
Use the following properties to specify filters that the GridControl‘s column supports:
Property Description ColumnBase.AllowedUnaryFilters Gets or sets unary filters that the GridControl‘s column supports. ColumnBase.AllowedBinaryFilters Gets or sets binary filters that the GridControl‘s column supports. ColumnBase.AllowedAnyOfFilters Gets or sets any of filters that the GridControl‘s column supports. ColumnBase.AllowedDateTimeFilters Gets or sets date-time filters that the GridControl‘s column supports. ColumnBase.AllowedBetweenFilters Gets or sets between filters that the GridControl‘s column supports. DataViewBase.AllowedGroupFilters Gets or sets group filters that the GridControl supports.
Refer to the Add Filtering topic to learn more.
Searching
The Searching feature is disabled by default. Refer to the Enable Search Panel topic to learn how to enable searching.
Note that virtual sources do not support text highlighting using the Search Panel. This element allows end-users to iterate between found values by pressing F3 or the built-in navigation buttons, which may lead to loading of a huge amount of rows when using virtual sources.
Total Summaries
The Total Summary feature is disabled by default.
To show summaries:
- Handle the InfiniteAsyncSource.GetTotalSummaries event to get total summaries.
- Specify the total summaries that the GridControl should display using the GridControl.TotalSummary property.
Refer to the Add Summaries topic to learn more.
Specify the allowed summary types using the ColumnBase.AllowedTotalSummaries and TableView.AllowCountTotalSummary properties to allow end users to display summaries.
Unbound Columns
- You can create an Unbound Column and edit the ColumnBase.UnboundExpression property with the Expression Editor.
- You cannot apply data shaping operations (sorting, grouping, summaries) to the Unbound Column.
If you have to calculate values on server by several columns, specify custom PropertyDescriptors using the VirtualSourceBase.CustomProperties property.
Conditional Formatting
- You can use the FormatCondition conditional formats only.
Printing and Exporting
- In the PagedAsyncSource and PagedSource, the Printing and Exporting feature is not supported.
- In the InfiniteAsyncSource and InfiniteSource, the GridControl prints and exports loaded rows only. In Data-aware export summaries are calculated by loaded rows on the Excel side, and can be different from the GridControl‘s values.
Data Navigator
- You can use navigation buttons in the Data Navigator. The Remove, Add, Edit buttons are disabled.
Drag-and-Drop
- The Drag-and-Drop feature is disabled by default. You can handle custom events to implement custom drag-and-drop.
Selection
- In the InfiniteAsyncSource and InfiniteSource, the DataControlBase.SelectAll method is ignored, and the Web-style Row Selection feature does not work.
- In the PagedAsyncSource and PagedSource, the DataControlBase.SelectAll method selects rows within the current page only.
Best Fit
- In the InfiniteAsyncSource and InfiniteSource, the BestFitMode.AllRows mode works only for loaded rows.
- In the PagedAsyncSource and PagedSource, the BestFitMode.AllRows mode works only for the current page’s rows.