See the
this article which explains how to create a C++ class, objects of which can be added to the grid.
CTestClass* pDO = new CTestClass();
Dapfor::GUI::HITEM handle = m_Grid.Add(pDO);
CTestClass* pDO1 = new CTestClass();
m_Grid.Add(pDO1, handle);
CTestClass* pDO2 = new CTestClass();
m_Grid.Add(pDO2, handle, Dapfor::GUI::GI_FIRST);
CTestClass* pDO3 = new CTestClass();
m_Grid.Add(pDO3, Dapfor::GUI::GI_FIXED_ROOT);