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

serverside and Custom sorting

4 Answers 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sampathkumar
Top achievements
Rank 1
Sampathkumar asked on 28 Nov 2009, 08:31 AM

Hi,

Is it Correct for sorting data in serverside.

            if (e.OldSortingState == SortingState.None)
            {
                e.NewSortingState = SortingState.Ascending;
                if (this.Sort != null)
                    this.Sort(new RsRoutedEventArgs(TaskType.Sort, "tskstdsort", this, e.Column.UniqueName, "0", this.IsInTabPage));
            }
            else if (e.OldSortingState == SortingState.Ascending)
            {
                e.NewSortingState = SortingState.Descending;
                if (this.Sort != null)
                    this.Sort(new RsRoutedEventArgs(TaskType.Sort, "tskstdsort", this, e.Column.UniqueName, "1", this.IsInTabPage));

            }
            e.Cancel = true;

if correct then why it is not showing the sort icon.

thanks
Sampathkumar S    

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Nov 2009, 06:55 AM
Hello Sampathkumar,

You can set desired column sorting state similar to this demo.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
boris
Top achievements
Rank 1
answered on 28 Apr 2010, 03:23 PM
Hi Vlad,
I am having similar problems, but the link you provided is no longer valid since you've moved to silverlight4.
Can you please provide some code examples?
Tnx :) 
0
Vlad
Telerik team
answered on 28 Apr 2010, 03:25 PM
Hi boris,

Here is the link for the old Silverlight 3 demo:
http://demos.telerik.com/silverlight/silverlight3/#GridView/Performance/ServerSide

You can check also this blog post for more info about server-side operations without RIA Services (with DomainDataSource the grid will sort on the server by default).

Greetings,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
boris
Top achievements
Rank 1
answered on 29 Apr 2010, 09:16 AM
Hi Vlad,
Thanks for your reply.
Unfortunately, the example doesn't work for me :(
I am doing server side sorting, and have added the part that should change the visual state of my header, but nothing happens..

   private void gvData_Sorting(object sender, GridViewSortingEventArgs e) 
   { 
           if (!String.IsNullOrEmpty(e.SortPropertyName)) 
           { 
               this.Columns[e.SortPropertyName].SortingState = e.NewSortingState; 
           } 
           e.Cancel = true
 
           //server side sorting code below 
           //... 
 
   } 

Header never changes visual state....
Tags
GridView
Asked by
Sampathkumar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
boris
Top achievements
Rank 1
Share this question
or