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

Filter not working on RadGridView bound to DomainDataSource

3 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
HDC
Top achievements
Rank 1
HDC asked on 19 Jan 2012, 06:54 PM

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







3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 20 Jan 2012, 10:19 AM
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 >>

0
HDC
Top achievements
Rank 1
answered on 23 Jan 2012, 10:07 PM
Hi Ross,

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

Nothing happens when a filter is clicked.

Best Regards,

Peter
0
HDC
Top achievements
Rank 1
answered on 09 Mar 2012, 10:02 PM
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.
Tags
GridView
Asked by
HDC
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
HDC
Top achievements
Rank 1
Share this question
or