Version

PropertyCachingEnabled Property

Returns or sets a boolean value indicating whether property values assigned to PivotGridRow and PivotGridColumn instances are persisted between data source updates.
Syntax
'Declaration
 
Public Property PropertyCachingEnabled As Boolean
public bool PropertyCachingEnabled {get; set;}
Remarks

When an OLAP data source is updated, any data structures created by the control, i.e., rows, columns, and cells, are recreated. This causes object reference identity for previously created rows, columns, and cells to be lost, even if the new data structure is identical to the previous one.

While the PivotGridColumn and PivotGridRow classes expose settable properties which govern the appearance and behavior of the headers and cells, these property values are lost when the data source is updated, since all row and column objects are reinstantiated in this case.

The PropertyCachingEnabled property can be used to overcome this limitation, by signifying to the control that property values applied to previously created PivotGridRow and PivotGridColumn instances should be maintained between updates, and then reapplied to the corresponding objects after the update is completed.

It should be noted that in the case where the data structure contains a relatively large number of rows and/or columns, performance can be adversely affected by enabling property caching, since a dictionary lookup is required to identify a row/column, and also because the property values of the previous object must be serialized, and then deserialized and applied to the new instance.

Use the ClearPropertyCache method to dereference all previously cached instances, thus releasing any memory used for that purpose.

Note that when the value of this property transitions from true to false, any existing cached values are dereferenced, as if the ClearPropertyCache method were called directly.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also