filter a collection of collections

2 posts, 0 answers
  1. Arturo
    Arturo avatar
    2 posts
    Member since:
    Aug 2012

    Posted 18 Jun 2011 Link to this post

    Hello

    I am using a class like the following:

    public class SLDocumentos
    {
        public int Identificador { get; set; }
        public string Nombre { get; set; }
        public SLCatalogoDoc IDActividad { get; set; }
        public SLCatalogoCorp Compania { get; set; }
        public ObservableCollection<SLCatalogoPerson> Personal { get; set; }
        public DateTime? FechaActividad { get; set; }
    }

    i made a Collection of that class and these are the items that i display in my RadGridView and now i want to filter it with the RadDataFilter but i have a trouble with this:

    public ObservableCollection<SLCatalogoPerson> Personal { get; set; }

    is possible filter it together with the other items??

    sorry for my poor english.

  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 20 Jun 2011 Link to this post

    Hi Arturo,

    That is not possible. RadDataFilter creates simple LINQ Expressions in order to filter the source collection. For example:

    sourceCollection.Where(person=>person.Name == "John")

    or

    sourceCollection.Where(person.Salary > 1000)

    When the property is another collection, such an expression cannot be created.

    All the best,
    Ross
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top