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

virtualization

3 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adam Walocha
Top achievements
Rank 1
Adam Walocha asked on 20 Aug 2009, 06:31 AM
Is possible to bind IQueryable data source to your grid in such way that it loads record from data source in fragment? Now when i bind collection, that implements IQueryable, grid retrievies all record (in my case it takes up to 2 minutes ).

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 Aug 2009, 06:38 AM
Hello Adam,

Please check this demo (you need to download and run our examples locally) for more info:
http://demos.telerik.com/wpf/?GridView/WPF/Performance/ServerSide

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Walocha
Top achievements
Rank 1
answered on 20 Aug 2009, 11:51 AM
While testing virtualization i meet following problem:
when  i try do change page i get exception:
"The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'."
I don't use method 'order by' and 'skip.
Code:

binding:
            QueryableCollectionView view = new QueryableCollectionView(presenter.Model.EntityList);
            view.PageSize = 1000;
            MessageBox.Show(view.TotalItemCount.ToString());
            radGridView1.ItemsSource = view;
change page:
            i++;
            ((QueryableCollectionView)radGridView1.ItemsSource).MoveToPage(i);

presenter.Model.EntityList implements IQueryable<Product> and class product derives from class EntityObject






0
Vlad
Telerik team
answered on 20 Aug 2009, 12:03 PM
Hi Adam,

Indeed with LINQ to Entities if you want paging you should provide default sorting.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Adam Walocha
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Adam Walocha
Top achievements
Rank 1
Share this question
or