ComponentOne FlexPivot for WinForms
C1.PivotEngine Assembly / C1.PivotEngine Namespace / C1PivotEngine Class / BeginUpdate Method
Example

In This Topic
    BeginUpdate Method (C1PivotEngine)
    In This Topic
    Suspend automatic updates to the output table while defining the PivotEngine view.
    Syntax
    'Declaration
     
    Public Sub BeginUpdate() 
    public void BeginUpdate()
    Remarks
    The PivotEngine updates the output table whenever the fields that make up the PivotEngine view change. Before making multiple changes (such as defining a new PivotEngine view), you can increase performance by enclosing the changes between calls to BeginUpdate and EndUpdate.
    Example
    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();
    See Also