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

[Solved] Customized Sorting not Working.

1 Answer 122 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.
Ronald
Top achievements
Rank 1
Ronald asked on 22 Jun 2009, 12:34 PM
Hi Telerik Team,
    Since we are not having built in Paging in RadGrid, i'm using my customized Paging. In this case i cant use bultin Sorting also(because i want sorting for my whole record). So i'm doing customized sorting in SortingEvent by using " IQueryable" like below.

string orderBy = "CustomerName ASC";
int currentPageIndex  = 0;
int pageSize = 25;

Data =

new ObservableCollection<MyQueueInformation>();

 

Data = e.Result;

IQueryable queryable = Data.AsQueryable();

 

queryable = queryable.OrderBy(orderBy);

 

radGridViewFiltering.Rebind();

radGridViewFiltering.ItemsSource = queryable.Skip(currentPageIndex * pageSize).Take(pageSize);

its working perfect for Paging. But when i'm sort my columns, sometimes it's not working properly. sometimes my grid is empty. Sometimes Bounded result is not same as result from "IQueryable". cant able to predict why grid behave like this.

What is the use of ReBind() method. if i removed this method, im getting empty grid(sometimes) while sorting.

i got paging and sorting logic from here - http://blogs.telerik.com/VladimirEnchev/Posts/08-08-13/How_To_RadGridView_for_WPF_paging_sorting_and_filtering_of_1mil_records_with_LINQ_to_SQL.aspx

can any one help me on this?


Thanks in advance
Ree.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Jun 2009, 08:30 AM
Hello Ree,

Can you send us small running example where we can reproduce this problem? I will gladly help you to fix this!

Greetings,
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
Ronald
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or