This is a migrated thread and some comments may be shown as answers.

Grouping, sorting, filtering in Data Virtualization

8 Answers 142 Views
Data Virtualization
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 30 Nov 2010, 12:18 PM
Hi!
Can I group, sort and filter data in a Data Virtualization? Before data fully loaded on the client.

Thanks.

8 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Nov 2010, 03:35 PM
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
0
Denis
Top achievements
Rank 1
answered on 01 Dec 2010, 06:35 AM
Thanks
0
Srujana
Top achievements
Rank 1
answered on 18 Feb 2011, 11:09 PM
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.
0
Vlad
Telerik team
answered on 21 Feb 2011, 08:44 AM
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
0
Srujana
Top achievements
Rank 1
answered on 21 Feb 2011, 07:56 PM
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.
0
Tsvyatko
Telerik team
answered on 25 Feb 2011, 10:56 AM
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!
0
Srujana
Top achievements
Rank 1
answered on 25 Feb 2011, 07:48 PM
Thanks, I will check this out and let you know if I see any issues.
0
David
Top achievements
Rank 1
answered on 01 Jul 2011, 07:52 AM
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
Tags
Data Virtualization
Asked by
Denis
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Denis
Top achievements
Rank 1
Srujana
Top achievements
Rank 1
Tsvyatko
Telerik team
David
Top achievements
Rank 1
Share this question
or