views:

481

answers:

0

I am trying to do some custom drawing in the row headers in a PivotGridControl in version 9.1. In version 8.2 I could use CreateDrillDownDataSource on the FieldCellViewInfo property on the event for the custom draw. In 9.1 this method does not exist.

The code I was using in 8.2 looks like this. Called from the CustomDrawFieldValue event handler.

PropertyInfo propertyInfo = typeof(PivotCustomDrawFieldValueEventArgs).GetProperty("FieldCellViewInfo",  BindingFlags.NonPublic | BindingFlags.Instance);
var fieldCellViewInfo = (PivotFieldsAreaCellViewInfo) propertyInfo.GetValue(args, null);
foreach (PivotDrillDownDataRow dataRow in fieldCellViewInfo.CreateDrillDownDataSource())
{
    if (pivotGrid.DataViewInfo.ListSource.Count > dataRow.ListSourceRowIndex)
    {
        yield return (T) pivotGrid.DataViewInfo.ListSource[dataRow.ListSourceRowIndex];
    }
}

What this ends up being used for is a Row modified marker on the grid on each row header that has modified data. I was hoping 9.1 would have a way of doing this without needing to use private API calls as we are doing in 8.2