RadDataFilter, RadGridView, RadDataPager, and QueryableCollectionView

3 posts, 0 answers
  1. Carl Herlitz
    Carl Herlitz avatar
    9 posts
    Member since:
    Jun 2010

    Posted 07 Jul 2015 Link to this post


    I have an application where I have a RadDataFilter, RadGridView, and RadDataPager all connected to a QueryableCollectionView, fed by an IQueryable query provided by Entity Framework 6.1. See below for sample code

    I've read in some other forum posts and articles, DataLoadMode="Asynchronous" is not recommended, and I see why. I'm getting a couple of interesting bugs.

    1) We often need to change the query that's bound to the grid (but still bound to the same entity type). As I don't see a way to change it for the existing, bound QueryableCollectionView, I just create and assign a new QueryableCollectionView to the QCV property in my view model (this raises a PropertyChanged event). When I try this, the busy indicator stays on after loading and displaying the data, behind the spinner. Going to another page, sorting, or filtering will remove the spinner.

    2) When paging and filtering, the first half of the items in the grid are hidden, while the other half stays visible, behind the spinner. This isn't really a functional issue, but it looks a bit weird, and distracting.

    As I mentioned before, I know that your suggestion is to not set DataLoadMode="Asynchronous", but then in that case, is there no way that I can asynchronously load data using an IQueryable from Entity Framework, with the Busy Indicator, that works properly? I can't block the UI thread in our application while loading data. Some of our queries are complex and can take 5+ seconds to respond. I don't mind the time it takes, but I do mind that the user can't interact with the UI during that time.

    Is there another class I can use? Some provider classes I can extend? This was very simple to do in Silverlight with WCF and the QueryableDomainServiceCollectionView. I'm surprised how this isn't as simple for WPF and Entity Framework.


    IQueryable<Entity> qry = _service.GetEntities();
    QCV = new QueryableCollectionView(qry);



    <telerik:RadDataFilter Source="{Binding Items, ElementName=DataGrid}" />
    <telerik:RadGridView x:Name="DataGrid"               
                                                 ItemsSource="{Binding QCV}" />
    <telerik:RadDataPager Source="{Binding Items, ElementName=DataGrid}"
                                                  PageSize="25" />


  2. Maya
    Maya avatar
    4062 posts

    Posted 10 Jul 2015 Link to this post

    Hi Carl,

    Why not working with IsBusy property of RadGridView ? You can bind it to a property in your ViewModel and update it on performing the heavy operations of refreshing the source. 

    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 Feedback Portal and vote to affect the priority of the items
  3. Carl Herlitz
    Carl Herlitz avatar
    9 posts
    Member since:
    Jun 2010

    Posted 29 Jul 2015 in reply to Maya Link to this post

    FYI, I got an answer from Telerik in a support ticket.

    Their answer was that they do not have out-of-the-box support for async data load with Entity Framework in WPF using the QueryableCollectionView.

Back to Top