Home Forums WPF controls Xceed DataGrid for WPF LINQ Table does not sort and group

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24153 |

    Hi,

    I tried to use DataGrid.WPF to show data from LINQ Table and use sorting and grouping capabilities of DataGrid. I know that Linq table does not have these capabilites so Microsoft DataGrid also does not allow to sort it automatically but DataGrid.WPF also does not it, even sorting on simple column types as int or string.

    In Microsoft LINQ forum I tried two times to discuss some kind of solution which could help implement sorting LINQ tables in DataGrid but no one get interested.
    Please see: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1851846&SiteID=1

    What do You think?
    Any idea?

    Regards

    Dariusz Jankowski

    Imported from legacy forums. Posted by Dariusz (had 544 views)

    User (Old forums)
    Member
    Post count: 23064

    I do have exactly the same problem.

    Is there really no way to sort the DataGrid by using a LINQ Table?

    Regards,

    Christian

    Imported from legacy forums. Posted by Christian (had 246 views)

    Xceed Support
    Member
    Post count: 5658

    If you encapsulate your LINQ Table with a DataGridCollectionView, you should have no problems sorting and grouping.

    You can refer to the documentation for details on how to use the DataGridCollectionView/DataGridCollectionViewSource since all of our samples are using it.

    Note to VS2008 users: Do not forget, when binding the DataGridControl to a DataGridCollectionView, to specify Path=View in the binding (see the FAQ post on this forum for more details )

    Imported from legacy forums. Posted by Marcus [Xceed] (had 353 views)

    User (Old forums)
    Member
    Post count: 23064

    It works now.

    Thank you!

    Regards,

    Christian

    Imported from legacy forums. Posted by Christian (had 3795 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.