I have a DataPager control bound to a DomainDataSource that has a SortDescriptor with Direction="Descending". The LoadSize on the DomainDataSource is set to 20. The PageSize on the DataPager is set to 10. I have a DataGrid with ItemsSource bound to the same DomainDataSource as the DataPager. When paging through the DataGrid, pages 1-2 are in correct sort order (descending), but then the remaining pages (3-5) are in ascending order. It seems that once it goes past the rows that were loaded initially due to LoadSize=20, it changes sort direction to Ascending. If I increase the LoadSize to 30 for example, then everything is OK for pages 1-3 and sort goes to descending on pages 4-5. I am using the May 2009 .NET RIA services preview.
Are you using Entity Framework? if yes, can you add an order by to your query
TFYR. Yes, I am using Entity Framework and a third party db connector for MySQL database. The column I'm ordering descending is the primary key ("id"). Do you think the problem might be with the third party connector? I added an OrderByDescending in the DomainService class but it did not help:
public IQueryable GetJobs()
return this.Context.jobs.Include("view_client").OrderByDescending(j => j.id);