<< Return to Main Index

< Return to Class Index

class CGXBrowserGrid: public CGXGridCore

The CGXBrowserGrid encapsulates the browsing functionality used by the CGXDaoGrid and the CGXODBCGrid classes. By encapsulating all the functionality necessary for browsing external data sources, you as programmer can benefit from the Objective Grid browsing capabilities and derive your own class from CGXBrowserGrid. This makes it possible for you to create MS-Query-like browsers for self-written databases or other database toolkits.

The CGXBrowserGrid class maintains one current record with the current cell.  When the user edits data in the current record, all changes are stored in an internal buffer.  When the user moves the current cell to another record, changes for the current record are written to the data source before the current cell is positioned to a new record.  When the user clicks on the last row, a new record will be added to the data source (if it supports appending records).

The DbfBrows sample provides a sample for deriving a view from CGXBrowserGrid and lets the user browse Dbase files.

The main features of CGXBrowserGrid are:

CGXBrowserGrid is not derived from CWnd. The CGXBrowserView class represents the GXBrowserGrid as view. The CGXBrowserWnd class represents the GXBrowserGrid as control.

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 to embed the CGXBrowseParam into the document and how to add support for serializing the scheme information of the grid.

Take a look at CGXBrowseParam. It describes some internal attributes that let you adapt the CGXBrowserGrid to your specific needs. Also, cut and paste behavior can be customized through CGXBrowseParam attributes.

#include <gxall.h>

See Also

CGXBrowseParam CGXBrowserView CGXBrowserWnd CGXDaoGrid CGXODBCGrid

CGXBrowserGrid

Class Members