|
There are many functions that help to locate C++ objects in the grid.
//If the C++ object was inserted only once, then you can use the next functions //to get a handle or determine a row index //Get handle CTestClass* testClass; Dapfor::GUI::HITEM handle = m_Grid.GetItem(testClass); //or get a row index and a context, where the C++ object has been added int row = m_Grid.GetRow(testClass); Dapfor::GUI::ContextType context = m_Grid.GetContextType(testClass); //If you have a handle, then you can get the row position int row = m_Grid.GetRow(handle); Dapfor::GUI::ContextType context = m_Grid.GetContextType(handle); //To get a C++ object which belongs to the handle, call Dapfor::Common::CDataObject* testClass = m_Grid.GetDataObject(handle); //The handle, that corresponds to the specified row index Dapfor::GUI::HITEM handle = m_Grid.GetItem(1); //The same for the fixed context Dapfor::GUI::HITEM handle = m_Grid1.GetItem(1, Dapfor::GUI::FixedContext); //To get C++ business object that is placed in the given row: Dapfor::Common::CDataObject* testClass = m_Grid.GetDataObject(1); //To get all children of some item: Dapfor::GUI::Handles children = m_Grid.GetChildren(handle, false); //To get all visible root nodes in the scrollable context Dapfor::GUI::Handles children = m_Grid.GetChildren(Dapfor::GUI::GI_SCROLLABLE_ROOT, true); //To get a parent item, call Dapfor::GUI::HITEM parent = m_Grid.GetParent(handle); //To get a herarchical level, call int level = m_Grid.GetHierarchicalLevel(hItem);
Also, you can read more about IForEach interface, that can be very useful.
| Copyright Dapfor 2007-2009 | Generated on Sat Jan 30 15:01:23 2010 for MFCGrid by 1.5.5 |