I have this working in version 1.13, but, using the same code, it appears that it no longer works the same way.
When a user selects what column they want to group by, I set the AlwaysGroupByColumn property to that column, and set the AlwaysGroupBySortOrder to SortOrder.None so that the user can group on one column and sort by another.
I have tried several different variations of setting these properties and rebuilding the list or setting the objects,but nothing seems to get it to work, including the way it was working in 1.13.
What happens now is that the rows are grouped by the column, but you can no longer sort by the column you click on. The sort icon stays on the grouped column.
Am I doing something wrong, or could this perhaps be a bug that was introduced?
Thanks for your help :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Phillip,
Have you had a chance to look into this yet?
If it's something you won't be able to get to for a while, maybe you could just point me towards the problem and I can put in a temp fix myself for a while until you get back around to it.
Thanks,
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Frustratingly enough, that one little thing is not very easy to remove. I'll have to give a bit of thought to how to rework the AlwaysGroupsBy stuff. It's becoming ugly -- and I hate ugly code :)
Regards,
Phillip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have this working in version 1.13, but, using the same code, it appears that it no longer works the same way.
When a user selects what column they want to group by, I set the AlwaysGroupByColumn property to that column, and set the AlwaysGroupBySortOrder to SortOrder.None so that the user can group on one column and sort by another.
I have tried several different variations of setting these properties and rebuilding the list or setting the objects,but nothing seems to get it to work, including the way it was working in 1.13.
What happens now is that the rows are grouped by the column, but you can no longer sort by the column you click on. The sort icon stays on the grouped column.
Am I doing something wrong, or could this perhaps be a bug that was introduced?
Thanks for your help :)
Hi Phillip,
Have you had a chance to look into this yet?
If it's something you won't be able to get to for a while, maybe you could just point me towards the problem and I can put in a temp fix myself for a while until you get back around to it.
Thanks,
Mike
Sorry, meant to say that I am using 2.1 now.
Here is the code that worked in 1.13
list.BeingUpdate();
list.AlwaysGroupByColumn = list.AllColumns[x];
list.ShowGroups = true;
list.AlwaysGroupBySortOrder = SortOrder.None;
list.BuildGroups();
list.BuildList();
list.EndUpdate();
Hi there,
Hmm. You're quite right. Sigh!
I'll have a look at it and try to have a fix in place for the 2.1 release. The fix will, of course, be available in the SVN before that.
Thanks for taking the time to report this bug.
Regards,
Phillip
The version I checked into the SVN tonight should fix this problem.
Give it a try -- if you're brave :)
Regards,
Phillip
I got your latest out of the SVN, and it does sort now, but the sort icon stays on the group column.
Thanks
There's always one more problem :)
Frustratingly enough, that one little thing is not very easy to remove. I'll have to give a bit of thought to how to rework the AlwaysGroupsBy stuff. It's becoming ugly -- and I hate ugly code :)
Regards,
Phillip