class CGXBrowseParam: public CGXGridParam

CGXBrowseParam holds specific data for the CGXBrowserGrid. It can be shared among several views (works the same way as CGXGridParam). You can embed it in a document if you want to support several browse views on the same data, as for example in a dynamic splitter window. The DbfBrows sample shows you how you can embed a CGXBrowseParam in a document, add support for opening several views on the same data, and serialize scheme information.

The following CGXBrowseParam attributes let you adapt a CGXBrowserGrid to your specific needs:

  • BOOL m_bCanStoreGridCellInCGXData;

Sometimes it makes no sense to store grid cells into CGXData. For example, CGXDaoGrid and CGXODBCGrid should load cell data from or store them in the recordset.

You should set bCanStoreGridCellInCGXData = TRUE if any cell data can be directly stored in CGXData. FALSE if only headers can be stored in CGXData.

The default value is TRUE.

  • BOOL m_bAllowPasteMultiCells;

Set this TRUE if you want to allow the user to paste multiple lines of text into the grid. If m_bAllowPasteMultiCells is FALSE the grid will only paste into the current cell (default).

The default value is FALSE.

  • CRowColArray m_awRowIndex;

CGXBrowserGrid uses this array in order to support rearranging rows. The CGXBrowserGrid methods GetRowIndex and GetRecordFromRow dereference the index associated with a row from this array. The CGXBrowserGrid implementations of StoreMoveRows, StoreRemoveRows and StoreInsertRows rearrange the m_awRowIndex array.

  • CRowColArray m_awColIndex;

CGXBrowserGrid uses this array in order to support rearranging columns. The CGXBrowserGrid methods GetColIndex and GetFieldFromCol dereference the index associated with a column from this array. The CGXBrowserGrid implementations of StoreMoveCols,StoreRemoveCols and StoreInsertCols rearrange the m_awColIndex array.

If you want to support serialization so the column positions will also be serialized (when the user has dragged columns), you should serialize this array explicitly. See also the DbfBrows sample.

  • UINT m_nEditMode;

This attribute holds the current edit-mode. This can either be CGXBrowserGrid::noMode, CGXBrowserGrid::edit or CGXBrowserGrid::addnew.

  • ROWCOL m_nCurrentRow;

This attribute holds the id for the currently edited row if nEditMode is not equal to noMode.

  • BOOL m_bEOFSeen;

This attribute must be FALSE as long as you don’t know the exact record count.

  • long m_nRecordLastSeen;

As long as m_bEOFSeen is FALSE, and therefore the exact record count is not known yet, this attribute holds the last-seen record. This value will be used as a high-water mark for the record count. m_nRecordLastSeen will increase while the user loops through the records.

  • long m_nRecordCount;

This attribute is obsolete for CGXBrowserGrid, but you are free to use this attribute in derived classes. CGXDaoGrid and CGXODBCGrid store the value returned by CRecordset::GetRecordCount into this attribute.

  • long m_nRecordCountInc;

This attribute is obsolete for CGXBrowserGrid, but you are free to use this attribute in derived classes. CGXDaoGrid and CGXODBCGrid will increase the m_nRecordLastSeen value only in increments specified by this attribute. This avoids flickering scrollbars, which could confuse customers if the scrollbar size changed every time they scrolled down a page. The default value is 512. This means that every time the user has scrolled 512 records, the grid will search for the next 512 records.

  • ROWCOL m_nRowCacheStart;

Caching – currently only CGXDaoGrid takes advantage of this. CGXDaoGrid calls the CDaoRecordset methods SetCacheStart and SetCacheSize. Please note that this only improves performance with external data sources or attached tables. Tables created directly in MS Access do not benefit from the DAO caching mechanism.

  • long m_nCacheSize;

Specify -1 to turn off caching.

  • long m_lMoveRecordWaitCursor;

This attribute is obsolete for CGXBrowserGrid, but you are free to use this attribute in derived classes. CGXDaoGrid and CGXODBCGrid use this attribute to determine when they should display an hourglass cursor. These classes check this value and display a wait cursor when they need to scroll more than m_lMoveRecordWaitCursor records in the recordset.

#include <gxall.h>

See Also

 CGXBrowserGrid  CGXBrowserView  CGXBrowserWnd  CGXDaoGrid  CGXODBCGrid  CGXDaoParam  CGXDbParam.

CGXBrowseParam

 Class Members