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

[Solved] RadGrid Sorting Problem

6 Answers 200 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 18 Oct 2008, 12:34 AM
I have a Rad Grid with the AllowSorting property set to "true" so on each column the column name owkrs as a link that activates the sorting, but the arrow that indicates asc or desc ordering causes an Invalid Postback or Callback Argument error/.

Strange thing is it just happens whis the arrow, not with the links. the links sort the grid with no problems.

Any ideas on how to fix this bug?

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 Oct 2008, 06:51 AM
Hi Luis,

Can you post a bit more info how the grid is bound in your case? Please check also if the grid ViewState is not turned off.

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Luis
Top achievements
Rank 1
answered on 20 Oct 2008, 04:08 PM
Hi. Thanks for your reply.

The Grids I'm using are bound to buisness objects. a Generic List of objects. and the properties of that object are bound to the grid.

Codebehind:

            List<DailyPointsParticipation> HistoryPromoThreshold = new List<DailyPointsParticipation>();
......
                tlkgrdThresholdPromotions.DataSource = HistoryPromoThreshold;
                tlkgrdThresholdPromotions.DataBind();

On my aspx page it is bound to each column like:

                                                                                        <telerik:GridBoundColumn meta:resourcekey="grdPromotionsBoundColumnResource1" UniqueName="colPromotion"                                                                                            DataField="Promotion" HeaderStyle-Width="20%">
</telerik:GridBoundColumn>
                                                                                        <telerik:GridBoundColumn meta:resourcekey="grdPromotionsBoundColumnResource2" UniqueName="colStartDate"
DataField="StartDate" HeaderStyle-Width="20%">
</telerik:GridBoundColumn>
 

The viewState is enabled. and the allow sorting is enabled also. When the grid is displayed the titles of each colum work as a link that sorts by that column and it works fine when click the link text (the name of the column) but, when you click on it) an image appears of an arrow that is either pointing down or up and you can keep on clicking the text to sort, but when you click the arrow the error message appears.

Maybe the grid is not rightly bound but it works when clicking the links. Or maybe the id of the columns is not being set right when the image is clicked... I really dont have a clue.
0
Vlad
Telerik team
answered on 21 Oct 2008, 06:11 AM
Hello Luis,

According to the DataBind() call you do not have NeedDataSource. Generally RadGrid automatic operations are supported if the grid is bound using DataSourceID or NeedDataSource. Please handle NeedDataSource, assing desired DataSource for the grid and do not call DataBind().

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Luis
Top achievements
Rank 1
answered on 21 Oct 2008, 06:52 PM
Ok. thanks.

It works fine as you say.
0
Michael Simmons
Top achievements
Rank 1
answered on 07 Aug 2009, 09:23 PM
I am having the same issue, clicking on the column names works FINE but clicking on the images does not. I'm not clear on how the binding would make a difference, please advise.
Thank you,
michael
0
Yavor
Telerik team
answered on 12 Aug 2009, 07:56 AM
Hello Michael,

If the problem persists at your end, you can open a formal support ticket, and send us a small working project, for additional review and testing. We will debug it locally, and get back to you with additional information.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Luis
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Luis
Top achievements
Rank 1
Michael Simmons
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or