Posted 2 October 2020, 2:57 am EST
Hi C1,
after using C1FlexGrid grouping for the first time, there are two questions/problems:
a) it is not possible to sort columns.
If column sorting is enabled, a crash will occur on click:
Message: Die Liste hatte eine feste Größe.
StackTrace:
bei System.SZArrayHelper.Add[T](T value)
bei C1.Win.C1FlexGrid.C1FlexGridBase.Sort(SortFlags order, Int32 col1, Int32 col2)
bei C1.Win.C1FlexGrid.C1FlexGridBase.#6jh(Int32 #4O)
bei #y9g.#brh.#Jqh(MouseEventArgs #9l)
bei C1.Win.C1FlexGrid.C1FlexGridBase.OnMouseUp(MouseEventArgs e)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m)
bei C1.Win.C1FlexGrid.C1FlexGridBase.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
(the message translates to something like “list has a fixed size”).
I don’t know whether sorting is possible/defined anyway. You might sort only the items inside of each group, or you might even sort the groups by the sort order of the first item of each group. We use the mode “HideGroupedColumns = true”, so there is no grouping column visible which could be used to sort the groups.
But at least a better error message should be shown, e.g. “Sorting is not possible when grouping”.
b) when AllowFilterung is true, you can set a filter so that empty groups are shown. Would it be possible to hide those rows without visible childs?
Probably this is possible when handling the “AfterFilter” event, but I would prefer if this would be part of the C1FlexGrid core code ;-).
I am on vacation next week, so don’t expect a quick reply of mine.
Best regards
Wolfgang