RadGridView shows filtered entries but RadDomainDataSource.DataView contains all entities, not just the filtered ones!

2 posts, 0 answers
  1. Paul Brause
    Paul Brause avatar
    10 posts
    Member since:
    Nov 2009

    Posted 09 Feb 2011 Link to this post


    I am using telerik controls for silverlight 4 internal build 2010.3.1331.
    I get my data via WCF RIA Services.
    I filter the contents of a RADDomainDatasource via a CompositeFilterDescriptor:

    CompositeFilterDescriptor compositeDescriptor = new CompositeFilterDescriptor();
    compositeDescriptor.LogicalOperator = FilterCompositionLogicalOperator.Or;
    if (ArticleDomain.FilterDescriptors != null) ArticleDomain.FilterDescriptors.Clear();
    if (ArticleDomain.FilterDescriptors != null)
          compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("Caption", FilterOperator.Contains, text));
          compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("Comment", FilterOperator.Contains, text));
          compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("EAN", FilterOperator.Contains, text));
          compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("ShortCaption", FilterOperator.Contains, text));
          compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("Number", FilterOperator.Contains, text));
    if (ArticleDomain.FilterDescriptors != null) ArticleDomain.FilterDescriptors.Add(compositeDescriptor);

    I populate my RadDomainDataSource ArticleDomain via the Load command. So far everything works fine.

    MainGridView.ItemsSource = ArticleDomain.DataView;
    Here I connect my RadGridView with the DataView of the ArticleDomain.
    When I do this and filter the ArticleDomain, in the RadGridView I get to see only the filtered entires, which is correct.

    Now I added two navigation symbols to my form which allow the user to navigate to the next or the previous entry in the RadGridView.
    Here is the code for the navigation to the next entry arrow:

    if (ArticleDataSource.DataView.CurrentPosition < ArticleDataSource.DataView.Count - 1) 

    But this code does not navigate through the entries visible in the MainGrid! When I start navigating to the next entry using the code mentioned above, the RadDomainDataSource navigates through the UNFILTERED COLLECTION containing about 900 entries and not through the filtered entries which
    are displayed in the MainGridView.

    I attached an image showing the problem.
    In this image I filtered my original RadDomainDataSource and I get 5 results, the unfiltered size was about 900 entries.
    The GridView shows correctly the filtered 5 entries sorted by the column ArtNr.

    When I click 4 times the "navigate next" button on top of my form, I land on ArtNr = 0003333, which is correct.
    The next time I press the "navigate next" button I would expect to land on the fifth row containing ArtNr 0008a.
    But I don't. Instead the orange row selector disapperars and I land internally on ArtNr 00004, which is not in the filtered list.

    To me this is either a bug or I am doing something horribly wrong :-(


  2. Rossen Hristov
    Rossen Hristov avatar
    2477 posts

    Posted 10 Feb 2011 Link to this post

    Hello Paul Brause,

    Would it be possible to open a separate support ticket and send us a very simple sample project that reproduces this behavior. We will debug and examine it immediately in order to see what is going on.

    Thanks in advance. We are looking forward to hearing from you.

    All the best,
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top