BeginUpdate Method (C1PivotEngine)
Suspend automatic updates to the output table while defining the PivotEngine view.
The code below shows how to define a new PivotEngine view efficiently by enclosing the changes between calls to
BeginUpdate and
EndUpdate.
// set data source (populates Fields list)
fp.DataSource = GetDataTable();
// prevent updates while building PivotEngine view
fp.BeginUpdate();
// show countries in rows
fp.RowFields.Add("Country");
// show categories and products in columns
fp.ColumnFields.Add("Category");
fp.ColumnFields.Add("Product");
// show total sales in cells
fp.ValueFields.Add("Sales");
// done defining the view
fp.EndUpdate();