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

[Solved] sorting doesn't work but grouping works

3 Answers 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sf
Top achievements
Rank 1
sf asked on 05 Feb 2010, 08:22 AM
I assign my single level Grid with an objectdatasource in code behind, in the same event I save the datasource in session, and have a needdatasource event to make sure the binding doesn't get lost by calling "Grid1.datasource =

(

ObjectDataSource)Session["objectdatasource1"]"

 

. At runtime the grouping works fine, when I tried to sort any column, it looks like it does sort (the column header is highlighted and the sort arrorw appears), but the actual records are not sorted.


any idea what's happening there?

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 05 Feb 2010, 09:47 AM
Hi sf,

If you are trying to sort by the columns on which you have grouped the data, you can do so only through the group panel item. Other columns should be sorting all right. Note in the attached sample that the data is grouped by CategoryID and you can sort on this column only through the group panel at the top of the grid. 

I hope this helps. 

Regards,
Tsvetoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
sf
Top achievements
Rank 1
answered on 08 Feb 2010, 12:32 AM
hi thanks for your reply.
I disabled grouping, the sorting still doesnt work, however the filtering works no problem...I double checked the datakeyvalue nothing wrong with it....
0
Tsvetoslav
Telerik team
answered on 11 Feb 2010, 07:45 AM
Hello sf,

Have you set AllowSorting=true for the MasterTableView. Unfortunately give the information provided it is not possible to say what exactly the problem might be. Could you paste your aspx and code-behind (please, use the code formatter tool of the ticket editor to paste your code).

Thanks in advance. 

All the best,
Tsvetoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Grid
Asked by
sf
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
sf
Top achievements
Rank 1
Share this question
or