locked
How do I page a silverlight view of CRM data RRS feed

  • Question

  • If I have a datagrid which I popularte from a LINQ query how can I make that datagrid paged? In my development environment I have about 60 records and loading them all is not a problem. In my test environment I have about 2000 and it quite obviously shows how slow CRM can be. LINQ returns the records in bacthes of 50 so presumably it should be relatively easy to page the datagrid view in some way but how can I do that and allow for the datagrid being reordered by its various columns.

    Thursday, February 13, 2014 10:12 AM

All replies

  • Hi,

    You can implement IPagedCollectionView on the view that the DataGrid is bound to - you can then add a pager control.

    In the MoveToPage method you can test to see if the requested page has been loaded and if not Query CRM for the data. 

    See http://msdn.microsoft.com/en-us/library/system.componentmodel.ipagedcollectionview(v=vs.95).aspx

    Hope this helps,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, February 13, 2014 10:19 AM
    Answerer