Clear Up
SharpKit Reference

StoreConfig Class

Namespace: Ext.data

Base Types

Constructors

Name Description
StoreConfig(Object[])

Fields

Name Description
buffered Allows the Store to prefetch and cache in a page cache, pages of Records, and to then satisfy loading requirements from this page cache. To use buffered Stores, initiate the process by loading the first page. The number of rows rendered are determined automatically, and the range of pages needed to keep the cache primed for scrolling is requested and cached. Example: // Load page 1 myStore.loadPage(1); A PagingScroller is instantiated which will monitor the scrolling in the grid, and refresh the view's rows from the page cache as needed. It will also pull new data into the page cache when scrolling of the view draws upon data near either end of the prefetched data. The margins which trigger view refreshing from the prefetched data are Ext.grid.PagingScroller.numFromEdge, Ext.grid.PagingScroller.leadingBufferZone and Ext.grid.PagingScroller.trailingBufferZone. The margins which trigger loading more data into the page cache are, leadingBufferZone and trailingBufferZone. By defult, only 5 pages of data are cached in the page cache, with pages "scrolling" out of the buffer as the view moves down through the dataset. Setting this value to zero means that no pages are ever scrolled out of the page cache, and that eventually the whole dataset may become present in the page cache. This is sometimes desirable as long as datasets do not reach astronomical proportions. Selection state may be maintained across page boundaries by configuring the SelectionModel not to discard records from its collection when those Records cycle out of the Store's primary collection. This is done by configuring the SelectionModel like this: selModel: {
pruneRemoved: false
            
} Defaults to: false
clearOnPageLoad True to empty the store when loading another page via loadPage, nextPage or previousPage. Setting to false keeps existing records, allowing large data sets to be loaded one page at a time but rendered all together. Defaults to: true
clearRemovedOnLoad True to clear anything in the removed record collection when the store loads. Defaults to: true
data Array of Model instances or data objects to load locally. See "Inline data" above for details.
groupDir The direction in which sorting should be applied when grouping. Supported values are "ASC" and "DESC". Defaults to: "ASC"
groupField The field by which to group data in the store. Internally, grouping is very similar to sorting - the groupField and groupDir are injected as the first sorter (see sort). Stores support a single level of grouping, and groups can be fetched via the getGroups method.
leadingBufferZone When buffered, the number of extra rows to keep cached on the leading side of scrolling buffer as scrolling proceeds. A larger number means fewer replenishments from the server. Defaults to: 200
pageSize The number of records considered to form a 'page'. This is used to power the built-in paging using the nextPage and previousPage functions when the grid is paged using a PagingScroller Defaults to 25. If this Store is buffered, pages are loaded into a page cache before the Store's data is updated from the cache. The pageSize is the number of rows loaded into the cache in one request. This will not affect the rendering of a buffered grid, but a larger page size will mean fewer loads. In a buffered grid, scrolling is monitored, and the page cache is kept primed with data ahead of the direction of scroll to provide rapid access to data when scrolling causes it to be required. Several pages in advance may be requested depending on various parameters. It is recommended to tune the pageSize, trailingBufferZone and leadingBufferZone configurations based upon the conditions pertaining in your deployed application. The provided SDK example examples/grid/infinite-scroll-grid-tuner.html can be used to experiment with different settings including simulating Ajax latency.
purgePageCount Valid only when used with a buffered Store. The number of pages additional to the required buffered range to keep in the prefetch cache before purging least recently used records. For example, if the height of the view area and the configured trailingBufferZone and leadingBufferZone require that there are three pages in the cache, then a purgePageCount of 5 ensures that up to 8 pages can be in the page cache any any one time. A value of 0 indicates to never purge the prefetched data. Defaults to: 5
remoteGroup True if the grouping should apply on the server side, false if it is local only. If the grouping is local, it can be applied immediately to the data. If it is remote, then it will simply act as a helper, automatically sending the grouping information to the server. Defaults to: false
sortOnFilter For local filtering only, causes sort to be called whenever filter is called, causing the sorters to be reapplied after filtering. Defaults to true Defaults to: true
trailingBufferZone When buffered, the number of extra records to keep cached on the trailing side of scrolling buffer as scrolling proceeds. A larger number means fewer replenishments from the server. Defaults to: 25
© Copyright 2005-2011 SharpKit. All rights reserved.