Grouping, sorting, filtering in Data Virtualization

9 posts, 0 answers
  1. Denis
    Denis avatar
    7 posts
    Member since:
    Oct 2010

    Posted 30 Nov 2010 Link to this post

    Hi!
    Can I group, sort and filter data in a Data Virtualization? Before data fully loaded on the client.

    Thanks.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 30 Nov 2010 Link to this post

    Hi,

    Currently grouping is not supported however you can sort and filter on the server using ItemsLoading event - please check this help article for more info. With our first service pack (middle of December) we will provide extension methods for EntityQuery and you will able to use the collection SortDescriptors and FilterDescriptors directly with WCF RIA Services. For example:

    view.ItemsLoading += (s, e) =>
               {
                   context.Load<Order_Detail>(query.Where(view.FilterDescriptors).Sort(view.SortDescriptors).Skip(e.StartIndex).Take(e.ItemCount)).Completed += (sender, args) =>
                  {
                      var lo = (LoadOperation)sender;
                      if (lo.TotalEntityCount != -1 && lo.TotalEntityCount != view.VirtualItemCount)
                      {
                          view.VirtualItemCount = lo.TotalEntityCount;
                      }
                      view.Load(e.StartIndex, lo.Entities);
                  };
               };

    Sincerely yours,
    Vlad
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Denis
    Denis avatar
    7 posts
    Member since:
    Oct 2010

    Posted 01 Dec 2010 Link to this post

    Thanks
  5. Srujana
    Srujana avatar
    38 posts
    Member since:
    Jan 2011

    Posted 18 Feb 2011 Link to this post

    Hello Vald,

    I get the following error when I tried adding

    .Where(view.FilterDescriptors).Sort(view.SortDescriptors).


    to my query, it works fine otherwise on loading data virtually, But sorting and filtering doesn't work. I am using SL4 and RIA, VS 2010.

    Instance argument: cannot convert from 'System.ServiceModel.DomainServices.Client.EntityQuery<SilverlightApplication1.Web.GridSpecific>' to 'System.Linq.IQueryable' C:\Documents and Settings\sxc0k6l\Desktop\tempFiles\SilverlightApplication1\SilverlightApplication1\MainPage.xaml.cs

    Thanks in advance,
    Srujana.
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Feb 2011 Link to this post

    Hello,

     You will need our extension methods. You can check this demo (and your local copy) for more info. You can check my blog post as well. 

    Kind regards,
    Vlad
    the Telerik team
  7. Srujana
    Srujana avatar
    38 posts
    Member since:
    Jan 2011

    Posted 21 Feb 2011 Link to this post

    Thanks Vlad.  I got this to work. I have another question though.

    Now I would like to add a 'search as you type' textbox functionality on my grid as the demo says  here.

    Is it possible to handle the filtering on headers and this composite filtering(explained in the demo) at the same time on the grid that is using data Virtualization.

    If you have any blog post or code sample that explains more on this, Please let me know.

    Thanks,
    Srujana.
  8. Tsvyatko
    Admin
    Tsvyatko avatar
    832 posts

    Posted 25 Feb 2011 Link to this post

    Hello Srujana,

    i have modified the example from the blog post mentioned earlier adding search as you type. Please have a look at the example and let me know if you have any further questions

    Regards,
    Tsvyatko
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  9. Srujana
    Srujana avatar
    38 posts
    Member since:
    Jan 2011

    Posted 25 Feb 2011 Link to this post

    Thanks, I will check this out and let you know if I see any issues.
  10. David
    David avatar
    2 posts
    Member since:
    Mar 2011

    Posted 01 Jul 2011 Link to this post

    Hey all
    The support of grouping and sorting on the data virtualization source, is this feature now available for the release Q1 2011 ?
    Thanks for replay.

    Kind regards
    Dave
Back to Top
DevCraft banner