Search code examples
silverlightwcf-ria-services

Performance in ListBox Silverlight - DomainDataSource and DataPager


Successfully binding a Listbox to a DomainDataSource using a DataPager. There are approx 7500 rows being brought back.

When I have 50 at a time, the performance starts out fine.

However after paging through 20 or more pages of 50, then the performance grinds down. Looking at db queries, the DataSource is being 'smart' and not having to go back to the db for the data.

 <riaControls:DomainDataSource x:Name="AccountsDataSource" AutoLoad="True" QueryName="GetUsersByxxx" LoadSize="100">
            <riaControls:DomainDataSource.QueryParameters>

and pager

<sdk:DataPager Margin="5,0,1,0" Source="{Binding Data, ElementName=AccountsDataSource}" PageSize="25" IsTotalItemCountFixed="True" />

Question: How to stop this caching of objects? Listbox / Datasource / Datapager..


Solution

  • Have found the problem to be the ContextMenu in the ListBox.... trying to solve that one now here was to do with: here