<< Return to Main Index

< Return to Class Index

class CGXAdoGrid: public CGXBrowserGrid

The CGXAdoGrid class provides functionality for browsing databases that can be accessed through any Microsoft OLE DB provider. This uses ADODB, an implementation of ADO optimized for use with Microsoft OLE DB providers. Only adOpenKeyset type cursor is supported. As for any CGXBrowserGrid-derived class, this class lets you create MS-Query-like views where you can browse these databases.

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 attached ADORecordset 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 ADORecordset (if it supports appending records).

The state information of the CGXAdoGrid class is stored in the CGXAdoParam class. CGXAdoParam 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 AdoQuery sample provides a sample for deriving a view from CGXAdoGrid and shows how to add support for serializing the scheme information of the grid.

CGXAdoGrid is not derived from CWnd. The CGXAdoRecordView class represents the CGXAdoGrid as view. The CGXAdoRecordWnd class represents the CGXAdoGrid as control.

#include <gxado.h>

See Also

CGXAdoParam CGXBrowserGrid CGXAdoRecordWnd CGXAdoRecordView

CGXAdoGrid

Class Members