Skip to content

Commit 83cb741

Browse files
committed
docs(pivotgrid): add information about state mode
1 parent 02310e2 commit 83cb741

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

controls/pivotgrid/caching.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ position: 11
1212

1313

1414

15-
**RadPivotGrid**’s aggregate calculations and grouping are driven by a powerful data engine which produces a special pivot view model. The latter feeds the aggregate values into the final output by the control. At times, however, when the data to be aggregated is quite large, the creation of the pivot view model can get pretty demanding in terms of CPU resources. In order to avoid the recalculation of large data that does not change very often, RadPivotGrid allows the caching of the pivot view model into the session state.
15+
**RadPivotGrid**’s aggregate calculations and grouping are driven by a powerful data engine which produces a special pivot view model. The latter feeds the aggregate values into the final output by the control. At times, however, when the data to be aggregated is quite large, the creation of the pivot view model can get pretty demanding in terms of CPU resources. In order to avoid the recalculation of large data that does not change very often, **RadPivotGrid** allows the caching of the pivot view model into the session state.
1616

17-
##
17+
##
1818

1919
Caching is enabled through the **EnableCaching** property of the control. For large sets of data using it will result in considerable speed up of any operations that require the rebinding of the pivot grid.
2020

2121
However, there are trade-offs that should be carefully considered before opting for the employment of this feature:
2222

23-
* **Memory consumption** is very likely to increase significantly if the web page where RadPivotGrid is placed on experiences intense traffic.
23+
* **Memory consumption** is very likely to increase significantly if the web page where the **RadPivotGrid** is placed in experiences intense traffic.
2424

2525
* There is evidently **no guarantee the data to be displayed will be up-to-date.**
2626

@@ -30,6 +30,25 @@ Note that in case you need to remove the model from the session you just should
3030
Session[RadPivotGrid1.UniqueID] = null;
3131
````
3232

33+
Caching is not supported when using <code>sessionState</code> modes requiring the object to be Serializable, e.g.:
34+
````ASP.NET
35+
<sessionState mode="SQLServer">
36+
</sessionState>
37+
````
3338

39+
The stored state object of type *Telerik.Web.UI.PivotGrid.Core.ViewModels.PivotViewModel* is not defined as [Serializable] in its implementation.
3440

35-
41+
````C#
42+
...
43+
internal class PivotViewModel : IPivotViewModel
44+
{
45+
private IDataProvider dataProvider;
46+
private IGroupDescription valuesDescription;
47+
48+
public PivotViewModel()
49+
{
50+
this.GrandTotalText = PivotLocalizationManager.GrandTotal;
51+
this.ValuesGroupText = PivotLocalizationManager.Values;
52+
...
53+
````
54+
Therefore, when using SQLServer mode the *SessionState* will not be saved.

0 commit comments

Comments
 (0)