Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Deleting nodes in CExtReportGridWnd Collapse All
Subject Author Date
David Skok Apr 9, 2008 - 3:02 PM

 


I use the LPARAM of report grid nodes to hold a pointer to data created with new which is the only pointer to this data.  I override

the function  CExtReportGridWnd::_ReportItemUnRegisterImpl

so that I may delete the data before the node is actually removed and returned to the pool.  It was always successful until I tried to clear the Report of all nodes using the following:


LONG nRowCount = m_wndGrid.RowCountGet();

if( nRowCount > 0L )

{

HTREEITEM hRootItem = m_wndGrid.ItemGetRoot();

ASSERT( hRootItem != NULL );

if( hRootItem != NULL )

m_wndGrid.ItemRemove( hRootItem, true, true );

}


I have found that  _ReportItemUnRegisterImpl is not called in this case which is disaterous.


Can you recommend an override that I may implement to GUARANTEE that I will catch when a report item is removed.


Thanks


 


 


 


 


 

Technical Support Apr 10, 2008 - 10:51 AM

Please override the CExtTreeGridWnd::OnTreeGridNodeRemoved() virtual method in a CExtReportGridWnd-derived class. The CExtTreeGridCellNode * pointer is really the CExtReportGridItem * pointer in the case of report grid.

David Skok Apr 9, 2008 - 6:43 PM

Never mind.  Duh, the answer is OnTreeGridNodeRemoved.  I requested that function last year.