Skip to content

Dynamic vs. Static Data

By default, data-aware grids are dynamic. The data is loaded as needed and cached in and out accordingly. If you wish, you can declare your data to be static by setting the [pbStaticData](../VdfClassRef/Windows/cDbCJGrid-Property-pbStaticData.md) property. When you do this, the data can still be loaded automatically via the [DataDictionary](../VdfClassRef/WebAndWindows/DataDictionary.md) objects (DDOs), but the entire set of data will be loaded once upon activation.

Loading all the grid data at once may incur a performance penalty when the grid is activated. However, there are several reasons why you may want to enforce a static data set in a data-aware grid, including:

  • Ensuring that the grid's vertical scrollbar behavior is always accurate (dynamic grids may not display an accurate vertical scrollbar until all the data has been loaded).
  • Enabling the grid data to be sorted by any grid column (regardless of whether the column is bound to an indexed table).
  • Bypassing the automatic loading of row data from the DDOs using [InitializeData](../VdfClassRef/Windows/cCJGrid-Procedure-InitializeData.md) to provide a customized set of data.

Static data is fully editable, and all edits will be properly processed through the DDOs.

See Also