Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Reporting
  [Expand]Chart Control
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Collapse]Binding to Data
      Connecting ASPxGridView to a Data Source
     [Expand]Binding to Large Data (Database Server Mode)
      Built-in Row Caching
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Adaptivity
     Save and Restore Layout
    [Expand]Templates
    [Expand]Export
     Toolbars
    [Expand]ASPxGridLookup
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Built-in Row Caching

ASPxGridView provides the ASPxGridView.EnableRowsCache property allowing you to enable or disable built-in row data caching.

By default, the ASPxGridView.EnableRowsCache property is set to true and ASPxGridView stores its current content in grid cache memory for quick access. So if the request to the server is not instantiated by ASPxGridView, or if the performing operation does not require the reloading of data (e.g., rearranging or hiding columns), then ASPxGridView will take the data from the cache. Therefore, it increases your Web application's scalability, and the individual operations will be quicker because there's no database access happening in that particular cycle.

In some cases, for instance, when the ASPxGridView displays real-time data, it can be useful to disable data caching by setting the ASPxGridView.EnableRowsCache option to false. We also recommend that you disable this option when binding to data created at runtime, because calling the DataBind method will always reload data from the server.

Note

If you use custom objects that utilize a referenced association, the ASPxGridView tries to cache references too. The serialization of a custom object is performed by the ToString method and is performed smoothly. But the object deserialization (restoration from String to object) could be raised with an exception:

TypeConverter cannot convert from System.String.

One solution is to turn off the ASPxGridView.EnableRowsCache property. This solution is acceptable when the page doesn't have several grids, and in most cases doesn't affect page performance significantly.

However, you can implement a custom TypeConverter derived class that can convert from the String type correctly. To learn more, see the Code Central example: How to implement a custom TypeConverter class for an XPO object

For more detailed information, see the ASPxGridView Row Cache online Knowledge Base article.

Expanded See Also

Is this topic helpful?​​​​​​​