<< Return to Main Index

< Return to Class Index

class CGXDBEHierGrid : public CGXDBEGrid < CGXRegularGrid <GRID> > template <class GRID>

GRID Specifies the grid class it will be bound to.

The CGXDBEHierGrid overrides certain hierarchical grid virtuals and holds a reference to CGXHierGridLayoutManager.

This class is used for instance to view ADO hierarchical data via the CGXHierADOEngine implementation.

Initialize a CGXDBEHierGrid derived class with an implementation of CGXHierADOEngine as follows:

void CAdoHierView::OnInitialUpdate()
{

   // m_pDBEngine is a CGXHierADOEngine an implementation
   // of CGXDBEngine.
   SetEngine(m_pDBEngine, NULL, FALSE);

   // Implementation(ADO) specific initailization
   // function. Derives from a base template. Always call
   // this after SetEngine.
   m_pLayoutManager->m_pfInitFunction =
                           GXInitHierGridFromADOEngine;

   CGXDBEHierGrid < CGXGridView >::OnInitialUpdate();

   GetParam()->SetSortRowsOnDblClk(TRUE);

   BOOL bOld = LockUpdate();

   // Specify the runtime child grid class.
   SetCommonChildGridType(gxRegularGrid,
                             RUNTIME_CLASS(CAdoChildWnd),
                             FALSE);

   ...
}

See Also

CGXDBEGrid CGXRegularGrid CGXHierGridLayoutManager