Skip to main content

Virtual Source Limitations

  • 4 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.

Note

TreeListView is not supported.

Sorting

Sorting is disabled.

To enable sorting:

  1. Fetch rows taking into account the GridControl‘s sorting using the FetchEventArgsBase.SortOrder property.

  2. Set the ColumnBase.AllowSorting property to true to allow sorting by specific column (the DataViewBase.AllowSorting property is ignored).

Tip

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

Filtering is disabled.

To enable filtering:

  1. Fetch rows taking into account the GridControl‘s filtering using the FetchEventArgsBase.Filter property.

  2. 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.

Tip

Refer to the Add Filtering topic to learn more.

Searching

Searching is disabled.

Tip

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

Total Summaries are disabled.

To show summaries:

  1. Handle the InfiniteAsyncSource.GetTotalSummaries event to get total summaries.
  2. Specify the total summaries that the GridControl should display using the GridControl.TotalSummary property.

Tip

Refer to the Add Summaries topic to learn more.

Use the ColumnBase.AllowedTotalSummaries and TableView.AllowCountTotalSummary properties to specify the allowed summary type and allow users to display summaries.

Note

Summaries for Selection are not supported.

Data Editing

Data Editing is disabled.

Virtual sources support editing only in Edit Entire Row mode:

  1. Set the ColumnBase.AllowEditing property to true for the columns that users can edit.

  2. Set the TableView.ShowUpdateRowButtons property to OnCellEditorOpen / OnCellValueChange to enable Edit Entire Row mode.

  3. Handle the GridViewBase.ValidateRow event and save the changes to an underlying data source (database) synchronously or asynchronously.

    To save the changes asynchronously, set the GridRowValidationEventArgs.UpdateRowResult property to a task that saves the changes.

<dxg:GridControl x:Name="grid">
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="Subject" IsSmart="True" AllowEditing="true"/>
        <dxg:GridColumn FieldName="User" IsSmart="True" AllowEditing="true"/>
        <dxg:GridColumn FieldName="Created" IsSmart="True" AllowEditing="true"/>
        <dxg:GridColumn FieldName="Votes" IsSmart="True" AllowEditing="true"/>
        <dxg:GridColumn FieldName="Priority" IsSmart="True" AllowEditing="true"/>
    </dxg:GridControl.Columns>
    <dxg:GridControl.View>
        <dxg:TableView ValidateRow="TableView_ValidateRow" ShowUpdateRowButtons="OnCellValueChange" />
    </dxg:GridControl.View>
</dxg:GridControl> 
private void TableView_ValidateRow(object sender, GridRowValidationEventArgs e) {    
    e.UpdateRowResult = Task.Run(() => {      
        IssuesService.UpdateRow(e.Row as IssueData);
    });
} 

Unbound Columns

If you have to calculate values on server by several columns, specify custom PropertyDescriptors using the VirtualSourceBase.CustomProperties property.

Conditional Formatting

Printing and Exporting

Data Navigator

  • You can use navigation buttons in the Data Navigator. The Remove, Add, Edit buttons are disabled.

Drag-and-Drop

Selection

Best Fit

Unsupported Features