GridViewSettings.EnableRowsCache Property
Gets or sets whether data caching is enabled.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
NuGet Package: DevExpress.Web.Mvc5
#Declaration
#Property Value
Type | Description |
---|---|
Boolean | true, to enable data caching; otherwise, false. The default is false. |
#Remarks
The GridView extension is able to store its data (the data of the current grid page) in memory for quick access. This might help avoid repeated database calls when performing various operations that don’t require reloading data (e.g., rearranging or hiding columns). For instance, this can be useful when the GridView is used in Database Server Mode - to reduce the number of database calls. To enable data caching, set the EnableRowsCache option to true.
By default, row data caching is disabled within the GridView. It is recommended to leave the EnableRowsCache property disabled in the following cases:
- The GridView displays real-time data.
- The GridView is bound to data created at runtime (because calling the Bind method always reloads data from the server).
- The GridView contains a BinaryImage column - a column whose MVCxGridViewColumn.ColumnType property is set to MVCxGridViewColumnType.BinaryImage (because preserving binary data in the row cache might dramatically increase the cache size and affect the application performance).
Note that the EnableRowsCache option must be disabled in the following cases:
- When using custom grouping intervals defined via the GridViewDataColumnSettings.GroupInterval property.
- When the GridView is used in Custom Data Binding mode.
Note
If you use custom objects that utilize a referenced association, the Grid
Type
One solution is to turn off the Enable
However, you can implement a custom Type