Johan's Blog

This and that in a developer's life in general
Welcome to Blogs @ IRM Sign in | Join | Help


The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.

This Blog

Silverlight DataGrid and DataPager Notes

I need to write these things down somewhere...

Brad's excellent tutorials and samples for learning Silverlight + RIA Services:

Scott's super blog post about columns and the DataGrid: (it's getting "old" but still rocks)

To use the DataPager properly with a DomainDataSource, you have to set a sort order. The docs for the DataPager says:

If you use the DataPager in an application with an Entity Framework data store, you must order the data returned by your queries for the DataPager to work correctly. The Entity Framework does not support paging of data without an OrderBy clause.

This can be done with the SortDescriptor property of the DomainDataSource, for example:

<riaControls:DomainDataSource  Name="dds" AutoLoad="True"         
                               LoadSize="20" LoadedData="dds_LoadedData">
        <Services:SomeDomainContext />
        <riaControls:SortDescriptor PropertyPath="name" Direction="Ascending"/>

Cross-posted from my blog at
Published den 5 juli 2010 13:39 by johan
Filed under:
New Comments to this post are disabled
Powered by Community Server, by Telligent Systems