I am using a pivot grid with editable bool fields. The user checks or un-checks the cells to indicate if they have completed the task.
I need to sum the number of completed tasks for total and grand total cells. I have tried your sample custom summary examples:
The line e.CustomValue = TrueVals; sets the value, however the grid always just displays a NULL check box and never the the value in CustomValue.
What am I missing??
if (ReferenceEquals(e.ColumnField, null) || ReferenceEquals(e.RowField, null))
e.CustomValue = "Grand Total";
PivotGridControl pivot = sender as PivotGridControl;
int lastRowFieldIndex = pivot.Fields.GetVisibleFieldCount(PivotArea.RowArea) - 1;
int lastColumnFieldIndex = pivot.Fields.GetVisibleFieldCount(PivotArea.ColumnArea) - 1;
if (e.RowField.AreaIndex == lastRowFieldIndex && e.ColumnField.AreaIndex == lastColumnFieldIndex)
e.CustomValue = e.SummaryValue.Max;
var SelectedActivity = e.CreateDrillDownDataSource();
if (SelectedActivity != null)
UserActivity activity = (ActivityList.Find(a => a.RowIndex == SelectedActivity.ListSourceRowIndex));
int TrueVals = (from a in ActivityList
where a.DateID == activity.DateID
&& a.Completed == true
e.CustomValue = TrueVals;
Try to assign RepositoryItemTextEdit repository items for cells where you want to display text. Please refer to the How to assign different in-place editors to different types of cells example where we demonstrated a similar approach.