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 » Why I cannot use RowRemove in CExtReportGridWnd? Collapse All
Subject Author Date
Bangjun Lei Oct 16, 2007 - 10:46 AM

Dear Sir./Madam.,

I tried to use RowRemove of CExtReportGridWnd but an alert in CExtTreeGridDataProvider::RowRemove jumps out saying that this function cannot be used. What should I do then?

Thanks!

Technical Support Oct 16, 2007 - 12:17 PM

You should not use CExtGridWnd::RowRemove() and CExtGridWnd::RowRemoveAll() in conjunction with the CExtReportGridWnd class. You can remove all the report grid items (rows) using the following code

CExtReportGridWnd * pReportGrid = . . .
LONG nColCount = pReportGrid->ColumnCountGet();
LONG nRowCount = pReportGrid->RowCountGet();
       if( nRowCount == 0 || nColCount == 0 )
              return;
       pReportGrid->SelectionUnset( false, false );
       pReportGrid->SelectionInsertAt( 0, CRect( 0, 0, nColCount - 1, nRowCount - 1 ), false );
       pReportGrid->ReportItemUnRegisterSelection();
The following code allows you to remove only a particular report grid item
CExtReportGridWnd * pReportGrid = . . .
CExtReportGridItem * pRGI = . . .
              VERIFY( pReportGrid->ReportItemUnRegister( pRGI ) );