DataGrid Known Issues: Data Sources

Certain types of data sources work best for DataGrid depending on your scenario. Following are some tips which you should keep in mind when choosing a data source for your DataGrid application:
  • Using Linq to SQL will break sorting. In the Linq to SQL case, SQL returns Table<T> which does not implement ITypedList and therefore prevents BindingListCollectionView from correctly sorting the items. Any Linq providers that return IBindingList will see this issue. This will be fixed in an upcoming release. Until that fix is available, we recommend that you do not use a Linq to SQL (or any other provider which returns IBindingList) data source if your DataGrid requires the sorting feature. Since Linq to objects returns IEnumerable, Linq to object data sources will not break sorting.
  • Autogeneration cannot interpret XML data sources. The DataGrid's autogeneration feature is not able to interpret the structure of XML data sources and convert them into rows and columns. If your application requires autogeneration of columns, we recommend that you choose an alternate data source. If you are specifying your own Columns collection and are not relying on autogeneration, then an XML data source will work fine for your scenario.

Last edited Oct 31, 2008 at 5:11 PM by SamanthaMSFT, version 4

Comments

No comments yet.