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 » CExtTreeGridWnd Collapse All
Subject Author Date
Eddie Judson Apr 11, 2006 - 2:35 AM

How can you remove columns from the CExtTreeGridWnd?
Regards,
Eddie

Technical Support Apr 11, 2006 - 6:58 AM

The CExtGridWnd::ColumnRemove() method removes a column(s) both from CExtGridWnd and CExtTreeGridWnd controls.

Eddie Judson Apr 11, 2006 - 7:03 AM

When ever I try that I get an assert from the following location:
bool CExtTreeGridDataProvider::ColumnRemove(
    ULONG nColNo,
    ULONG nRemoveCount // = 1
    )
{
    ASSERT_VALID( this );
    nColNo;
    nRemoveCount;
    // this method must never be invoked
    ASSERT( FALSE );
    return false;
}

Technical Support Apr 11, 2006 - 11:45 AM

Not it’s understandable what you want. The CExtTreeGridDataProvider::ColumnRemove() method should redirect its call to the internall cache data provider as it is done in the CExtTreeGridDataProvider::ColumnInsert() method:

bool CExtTreeGridDataProvider::ColumnRemove(
    ULONG nColNo,
    ULONG nRemoveCount // = 1
    )
{
    ASSERT_VALID( this );
CExtGridDataProvider & _DP = _Tree_GetCacheDP();
    return _DP.ColumnRemove( _Tree_MapColToCache( nColNo ), nRemoveCount );
}




Eddie Judson Apr 11, 2006 - 5:07 PM

I have changed the CExtTreeGridDataProvider to the below in the library and rebuilt it and ColumnRemoveAll( false ); seems to work now.
bool CExtTreeGridDataProvider::ColumnRemove(
    ULONG nColNo,
    ULONG nRemoveCount // = 1
    )
{
    //ASSERT_VALID( this );
    //nColNo;
    //nRemoveCount;
    //// this method must never be invoked
    //ASSERT( FALSE );
    //return false;
    CExtGridDataProvider & _DP = _Tree_GetCacheDP();
    return _DP.ColumnRemove( _Tree_MapColToCache( nColNo ), nRemoveCount );
}