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

Client side sorting

2 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike Taylor
Top achievements
Rank 1
Mike Taylor asked on 07 Oct 2010, 04:20 PM
Hello,

I have a simple RadGrid binded with a WCF Web Service like this:
<ClientSettings>
     <DataBinding Location="~/MyWCFWebService.svc" SelectMethod="GetListAndCount" SortParameterType="String" FilterParameterType="String"></DataBinding>
</ClientSettings>

1) I'm wondering how to set a default sort expression (client-side)?

2) Same question to set a default filter (client-side).

3) I noticed the sort behavior is different between server-side and client-side binding mode.
With a server side binding, when you sort a grid column the header back color is changing.
However with client side binding the header back color stays identical.
How is it possible to have same behavior in both case (header back color changing when the column is sorted)?

Thank you

2 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 07 Oct 2010, 06:59 PM
Hello Mike,

1) To sort, here's the help topic link: http://www.telerik.com/help/aspnet-ajax/grid_sort.html
2) To filter, here's the help topic link: http://www.telerik.com/help/aspnet-ajax/grid_filter.html
3) I don't know how to do it, since when a column is sorted on the server, it gets a class added to each column to mark it as sorted. Possibly calling the RadGrid's repaint method would solve this issue. Here the help topic link: http://www.telerik.com/help/aspnet-ajax/grid-repaint.html

I hope that helps.
0
Mike Taylor
Top achievements
Rank 1
answered on 08 Oct 2010, 11:02 AM
Hi Cori,

Thx for your help !
I tested client-side sorting and it works great (I suppose filtering too).

However the repaint() method do not seem to change the header background color.
So I will try to add the css class manually.

Mike
Tags
Grid
Asked by
Mike Taylor
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Mike Taylor
Top achievements
Rank 1
Share this question
or