Posted 20 January 2020, 10:10 am EST
I am trying to get a custom
DataGridAggregate
Implementation. I implemented a class such as:
public class MyDataGridAggregate : DataGridAggregate
{
public override object Compute(DataGridRowCollection rows, DataGridColumn column, bool recursive)
{
var items= rows.As<DataGridRowCollection>().ToList().Select(x => x.DataItem).OfType<MyModel>().Select(pd => pd.InterestingField).Distinct().ToList();
return string.Join(@",", items);
}
}
This gets attached to a
DataGridTextColumn
this way:
<c1:DataGridTextColumn Binding="{Binding SomeName}">
<c1:DataGridAggregate.AggregateFunctions>
<c1:DataGridAggregatesCollection>
<planDetail:MyDataGridAggregate ResultFormat="D = {0}"/>
</c1:DataGridAggregatesCollection>
</c1:DataGridAggregate.AggregateFunctions>
</c1:DataGridTextColumn>
The custom aggregator gets called correctly, however the group row value does not get refreshed when I update the underlying data of
InterestingField
. How can make sure this happens correctly?
Thank you