tags:

views:

57

answers:

2

Based on this article http://www.codeproject.com/KB/linq/bindinglist_sortable.aspx I implemented my bussines object with sortable feature. When I send the object to the client app (winfoms), the objects is not sortable. Does anyone have a solution for this?

Thanks for the answer, Jani

A: 

You should perform the sorting on the client, not in the service.

Return a collection/list/array from your WCF service, feed it to your SortableBindingList on the client side and pass that list on to your grid. That should do the trick.

Inferis
A: 

LINQ is the perfect companion for WCF and the arrays of objects returned. We use it for sorting and doing minor customization on the results returned by our services. In some systems we will actually pull down larger datasets and hold them on the DMZ web servers in application state and reuse the sets to satisfy multiple similar client requests with LINQ for some additional massaging.

listingQuery = listingQuery.OrderByDescending(p => p.JobCityId).ThenBy(p => p.WorkingTitle);
Ira Miller