Hello,
for our program we use the MVVM-Pattern, so we have some "bindable propertiers". Such like the GroupDescriptorCollection (named DefaultGroupDesciptors) for the GridViews in our forms.
The important part:
This part doubles the AggregateFunctions from the first element:
(
...
)
to the seond element
(
...
...
).
I think a picture is helpful:

If I rotate the "important part", it works...
I hope you can explain me what happens here...
Regards
Arne Z.
for our program we use the MVVM-Pattern, so we have some "bindable propertiers". Such like the GroupDescriptorCollection (named DefaultGroupDesciptors) for the GridViews in our forms.
protected override void InitGroups(){ DefaultGroupDescriptors = new GroupDescriptorCollection(); GroupDescriptor Descriptor_STKNR = new GroupDescriptor(); Descriptor_STKNR.Member = "Field1";
CountFunction cound = new CountFunction(); Descriptor_STKNR.AggregateFunctions.Add(cound); DefaultGroupDescriptors.Add(Descriptor_STKNR); GroupDescriptor Descriptor_MEAUF = new GroupDescriptor(); Descriptor_MEAUF.Member ="Field2";
SumFunction sum = new SumFunction(); Descriptor_MEAUF.AggregateFunctions.Add(sum);
DefaultGroupDescriptors.Add(Descriptor_MEAUF); }
// execut at the binding:
foreach (GroupDescriptor Elem in DefaultGroupDescriptors)
{
Grid.GroupDescriptors.Add(Elem);
AddAggregateFunctions(Grid, Elem);
} private static void AddAggregateFunctions(RadGridView Grid, GroupDescriptor Elem){ if (Elem.AggregateFunctions != null) { foreach (AggregateFunction Function in Elem.AggregateFunctions) { Grid.Columns[Elem.Member].AggregateFunctions.Add(Function); } }}The important part:
Grid.GroupDescriptors.Add(Elem);
AddAggregateFunctions(Grid, Elem); This part doubles the AggregateFunctions from the first element:
(
...
CountFunction cound = new CountFunction(); Descriptor_STKNR.AggregateFunctions.Add(cound); DefaultGroupDescriptors.Add(Descriptor_STKNR);
... to the seond element
(
...
DefaultGroupDescriptors.Add(Descriptor_MEAUF);).
I think a picture is helpful:
If I rotate the "important part", it works...
foreach (GroupDescriptor Elem in newValue){ AddAggregateFunctions(ActGrid, Elem); ActGrid.GroupDescriptors.Add(Elem);}I hope you can explain me what happens here...
Regards
Arne Z.