Pagination needs QueryableDomainServiceCollectionView. How to obtain it?

4 posts, 0 answers
  1. Vitor
    Vitor avatar
    53 posts
    Member since:
    Mar 2016

    Posted 08 Mar 2016 Link to this post

    Dear Telerik Support
    I just started using your controls for WPF, to see if it suits the needs of our company
    Starting by doing basic examples, I stumbled upon the RadGridView pagination
    I am trying to use this example and
    and this documentation
    But it seems my grid wont page if I dont use this

       this.view = new QueryableDomainServiceCollectionView<Customer>(context, getCustomersQuery);
       this.view.PageSize = 10;

    thus attributing the PageSize to it.
    right now I use a ObservableCollection<Entity> List.

    So my question is: Where how can I use the above mentioned class (QueryableDomainServiceCollectionView) to support my need of pagination?
    I don't want to paginate it manually, by using the Unbound mode. and I would prefer to avoid that all data goes into memory

    I wish I could attach a zip file of my project. but since I cannot, here is the code (note: you must install the PropertyChanged.Fody nugget in order to run it):


    <Window x:Class="TelerikWpfApp1.MainWindow"
    Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Grid Name="grid">
    <telerik:RadGridView x:Name="radGridView"
    Margin="23,30,0,0" VerticalAlignment="Top"
    Height="234" Width="468"
    ItemsSource="{Binding List}" AutoGenerateColumns="True">
    <telerik:GridViewColumn BindingGroup="{Binding id}"/>
    <telerik:RadDataPager x:Name="radDataPager"
    Source="{Binding List, ElementName=radGridView}" />


    using System.Windows;
    namespace TelerikWpfApp1
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    ViewModel vm = null;
    public MainWindow()
    private void Window_Loaded(object sender, RoutedEventArgs e)
    vm = grid.DataContext as ViewModel;



    using PropertyChanged;
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    namespace TelerikWpfApp1
    public class ViewModel
    public ObservableCollection<Entity> List { get; set; }
    public void Load()
    List = GetList().ToObservableCollection();
    List<Entity> GetList()
    List<Entity> list = new List<Entity>();
    for (int i = 0; i < 100; i++)
    list.Add(new Entity() { comment = "dasd", id = 1, name = "fefe" });
    list.Add(new Entity() { comment = "xxcv", id = 2, name = "dewd" });
    list.Add(new Entity() { comment = "zzz", id = 3, name = "jjj" });
    return list;

    //public void Save(Entity item, string comment)
    // if (item.comment != comment)
    // {
    // //controller.Save(); }
    // }
    public class Entity
    public int id { get; set; }
    public string name { get; set; }
    public string comment { get; set; }
    public DateTime StartDate { get; set; }
    public DateTime EndDate { get; set; }
    public static class ListExtensions
    public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> items)
    var c = new ObservableCollection<T>();
    foreach (var item in items)
    return c;


    Thank you!!!!

  2. Vitor
    Vitor avatar
    53 posts
    Member since:
    Mar 2016

    Posted 09 Mar 2016 Link to this post

    looking forward to hear from you!

    guess pagination is pretty basic

  3. Stefan
    Stefan avatar
    1073 posts

    Posted 10 Mar 2016 Link to this post

    Hi Vitor,

    Generally, QueryableDomainServiceCollectionView is part of the UI for Silverlight suite, but you mentioned using the UI for WPF one. Can you please clarify this?

    Best Regards,
    Stefan X1
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  4. Vitor
    Vitor avatar
    53 posts
    Member since:
    Mar 2016

    Posted 11 Mar 2016 Link to this post

    Hello Stefan,
    Yes, what you said proceeds. I was using the wrong documentation.
    But nonetheless I still have issues with the pagination.

    please refer to this ticket. I messed up this one.

Back to Top