Hello,
I use group by Mode in WinGrid (Infragistics 8.3)
I need to group by records accroding to column A but I neeed to sort them by the summary value of column B when I click on the header of column B.
I have created my own Groub By Comparer but I do not manage to enter in it when click on the header of a column. It is the same problem after overriding the HeaderClickAction of this column with SortSingle or SortMulti..
The problem is I cannot manage to enter in the GroupByComparer of my column. How can I do that ?
(In fact I enter in the GroupByComparer only ath the loading on my group By Rows in the method Infragistics2.Win.UltraWinGrid.v8.3.dll!Infragistics.Win.UltraWinGrid.RowsCollection.InitGroupByRows() + 0x16a bytes )
How can I enter in this InitGroupByRows method I click on the Header of a column ?
Thx
Pierre,
I don't know that there's a way to call the GroupBySortComparer manually, since I think that this is used internally. Does calling the following help?
this.ultraGrid1.DisplayLayout.Bands[1].SortedColumns.RefreshSort(true);
I think that since the grid makes the assumption that when there's only one row no sorting needs to occur, there might not be a way to get around this. The above method should force the grouping to occur again, which may be what you're trying to do when sorting, though again I'm not entirely sure.
-Matt
I have submitted a sopport request yesterday but I did not receive any response. (Support Request CAS-11367-ZI354O).
In fact, I know that I am not in the good conditions to call the comparers (I have just one child row in each group by row and further more I dont what to sort by the group by column but by another column).
A good work around for my problem would be to find a way to call the group by comparer. (I could call it in the AfterSortChange)
I noticed that the Infragistics method InitializeGroupByRows calls it. Do you know a way to call the Infragistics2.Win.UltraWinGrid.v8.3.dll!Infragistics.Win.UltraWinGrid.RowsCollection.InitGroupByRows method ?
Sorry for my poor english. It is probable the cause of our miscommunications .... Thank you in advance.
Pierre
Perhaps there are some miscommunications here. I said in a previous post that the SortComparer should be fired for non-groupby columns, even when they are children of GroupByRows, but only if there is more than one row in that particular rows collection. The GroupBySortComparer should always be used when sorting the GroupByRows when grouped by that column. If these aren't firing for any reason and there is more than one row in the collection, then you should probably submit an incident to Developer Support since this is difficult to resolve through the forums.
Hello Again,
I did not manage to find a solution to my problem. Any Idea ?
Thanks
P.S. Matt I tried to use your sample. I have the same problem with it : I did not enter in the gccomparer when I I click on the header of a non group by column.
It does not work me. I precise that I do not want to sort by clicking in a column header in the group by zone but according to a non group by column (which has summary values).
I am sorry if my question was not clear. :$