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

Setting SortDescriptors before data throws Exception

1 Answer 40 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael Evans
Top achievements
Rank 1
Michael Evans asked on 06 Apr 2010, 10:00 PM
I'm saving the SortDescriptors for my RadGridView whenever they are changed.  Whenever the user comes back to the grid, it loads the SortDescriptors and re-applies the last sort they had used.  It is working fine except for the fact that if I try to set the SortDescriptors before there is any data in the grid, an ArgumentException is thrown.  If I wait until the data is in the grid (it takes several seconds for the web service to return the data) then the SortDescriptors are fine.

To test my theory, I tried adding a dummy, blank row of data and then set the SortDescriptors and that worked.  So it only seems to be happening if there is no data in the grid at all.  Why can't I set my sorting before the data arrives so that it will immediately apply the sort?

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 07 Apr 2010, 09:11 AM
Hi Michael Evans,

Actually, we think that this is an issue that we are currently working on. We have discovered that this happens with grouping, but it is the same for sorting and filtering when the grid has no data. All clues point that we are currently fixing the bug that you have hit. But we must be 100% sure that this is so.

We have already made the fix and we are currently testing it in all kinds of scenarios. Can we ask you something that will help us a lot. Can you send us your sample project that exhibits this behavior. We will run it against the old assemblies to verify the bug manifests itself. Then we will run your project against the "fixed" version in order to confirm that the bug is gone. In other words, you can help us a lot by sending us your real-life project to test against. But we will understand if that is not possible.

We would like to thank you for reporting this. We are looking forward hearing from you.

All the best,
Ross
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.
Tags
GridView
Asked by
Michael Evans
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or