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

Need to implement Custom Sorting on Multiple columns of WPF Grid

4 Answers 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Harshal
Top achievements
Rank 1
Harshal asked on 05 Jan 2011, 07:23 AM
I have a urgent requirement of implementing custom sorting on maximum 3 columns of WPF grid.
I am implementing paging in WPF RadGrid Control which has maximum fetch size of 500 records. Rest of the records remains on the server.
Requirement is when I click on Grid Column Header I need to send the column name as well as Sorting State to the server. Also, when another column header is clicked it should again give a call to Server method and send the first as well as second column name and their respective SortingStates. Maximum 3 columns can be sorted.
Kindly suggest.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 05 Jan 2011, 09:29 AM
Hi,

 When the grid is bound to LINQ context (LINQ to SQL, Entity Framework, Open Access, etc.) will do this automatically. You can check our "Performance/Server Page, Sort, Group and Filter" demo in your local copy of our demos for more info. 

All the best,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Harshal
Top achievements
Rank 1
answered on 05 Jan 2011, 12:03 PM
Can you please share the Source Code for Multiple Column Sorting on WPF Grid?
0
Vlad
Telerik team
answered on 05 Jan 2011, 12:44 PM
Hello,

 The grid will sort by multiple columns by default - no need to code anything. 

All the best,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Harshal
Top achievements
Rank 1
answered on 05 Jan 2011, 01:20 PM
Hello,

Thanks a lot for quick response. It is inbuilt functionality I agree. But there is a requirement of implementing MultiColumn Sort in WPF Grid in such a way that I will have to use programatic approach. So can you please share the sample for the same?
It will be very kind of you if you are able to provide me sample application source code of it.

Thanks & Regards,

Harshal Deshpande
Tags
GridView
Asked by
Harshal
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Harshal
Top achievements
Rank 1
Share this question
or