Filter not working on RadGridView bound to DomainDataSource

4 posts, 0 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 19 Jan 2012 Link to this post

    I got following grid definition :

    <telerik:RadGridView x:Name="RssFeedsGrid"
                         ItemsSource="{Binding RssFeeds}"
                         AutoGenerateColumns="False"
                         IsReadOnly="False"
                         IsBusy="{Binding IsBusy}"
                         ShowGroupPanel="False"
                         Grid.Row="0"                                                                                                          
                         CurrentItem="{Binding CurrentRssFeed, Mode=TwoWay}"
                         telerik:RadDragAndDropManager.AllowDrop="True"
                         BorderThickness="0"
                         Padding="0"
                         Margin="0"
                         DataLoading="RssFeedsGrid_DataLoading"
                         Background="Transparent"                        
                         >
    </telerik:RadGridView>

    It's bound to a viewmodel that is a singleton using following code:

    this.DataContext = ViewModels.ExqiRssFeeds.RssFeedsParentViewModel.Instance;

     

    The collection RSSFeeds is defined as follows:

    public QueryableDomainServiceCollectionView<ExqiFramework.Shell.Web.RssFeed> RssFeeds
        {
          get
          {
            return this._rssFeeds;
          }
          set
          {
            _rssFeeds = value;
     
            this.OnPropertyChanged("RssFeeds");
          }
        }

    Data for RssFeeds is loaded using following code:

    EntityQuery<ExqiFramework.Shell.Web.RssFeed> getRssFeeedsQuery = this._ExqiPresenterDomainContext.GetRssFeedsSortedQuery();            
    this.RssFeeds = new QueryableDomainServiceCollectionView<ExqiFramework.Shell.Web.RssFeed>(this._ExqiPresenterDomainContext, getRssFeeedsQuery);      

    All of this works for loading data, but when i apply a filter to any of the columns, nothing happens.

    Am i missing something?
     
    Do i need to handle myself the filtering events and if so how do i do that with a viewmodel?

    Best Regards,

    Peter







  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 20 Jan 2012 Link to this post

    Hello,

    You do not need to do anything manually.

    Can you please take a look at the sample project from my blog post? There filtering works as expected.

    Also, take a look at this online example. Filtering works as expected out of the box.

    Greetings,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 23 Jan 2012 Link to this post

    Hi Ross,

    I have double checked and it just isn't working for me.

    Nothing happens when a filter is clicked.

    Best Regards,

    Peter
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 09 Mar 2012 Link to this post

    Finally figured it out... this was caused by the type of collection i was binding to... don't bind a grid to a QueryableDomainServiceCollectionView object... it will not work.

    I solved it by just pumping over the colection to a ObservableCollection.
Back to Top