Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
ExternalSort with LoadOnDemand DataSource


I'm using a UltraWinGrid binding to UltraDataSource with the LoadOnDemand-Feature and the HeaderClickAction.ExternalSortSingle Setting.
The Grid contains about 150 columns and up to 40000 rows. Therefore we load the data in an asynchronous manner with portions of 50 models.

As the Sorting should not be done by the Grid (it would load the data completely which will be avoided using LoadOnDemand) the Modellist must be sorted before adding a row to the UltraDataSource for each model in the list.

The workflow is:
- Load first 50 objects into a ModelList
- Sorting the List
- Adding 50 rows to the Datasource with each containing the model as tag
- Setting the DataSource to UltraWinGrid
- Loading next 50 objects
- Adding it to the ModelList (now containing 100 models)
- Sorting it again
- Adding the new rows to the Datasource (already binded to the UltraGrid)

=> the Rows will not be added in the correct sort order as it will be added at the end of the DataSource
=> after loading all 40000 Models, I got a ModelList with 40000 models and have to sort it completey again, which makes the asynchronous loading useless.

- How can I add each portion of 50 Models in a sorted manner to the DataSource, without causing the UltraWinGrid loading all the grid rows due to sorting?

- Do you have any other idea how to load the 40000 datarows sorted into the UltraGrid with high Performance?

Your help will be really appreciated!!