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 » CExtGridCellComboBox::SetEnumMode(false) in CExtPropertyGridCtrl bug fix not in latest 2.83 source Collapse All
Subject Author Date
D. Cameron DeHeer May 9, 2008 - 7:12 AM

Hello,

There was a defect with CExtGridCellComboBox::SetEnumMode(false) originally reported in December that had a fix posted that I don’t see in the latest 2.83 source code I downloaded yesterday. The original post was:

http://www.prof-uis.com/prof-uis/tech-support/support-forum/cextgridcellcombobox-resetcontent-bug-58658.aspx fix consisted of the else at the bottom of the ::Assign method:

The



					    else
								   pCell->TextGet( m_str );


I can reproduce the issue by subclassing CExtPropertyGridCtrl and overloading OnPgcInputComplete. Calling TextGet for the combo box after it has changed always returns “” rather than the entered text (whether you have typed in something not in the list or selected an item in the list). I can send you the modified PropertyGrid sample code if necessary. Thanks for looking into this.

Regards,

Cameron

Technical Support May 12, 2008 - 12:55 PM

Yes, we confirm this. We have just changed our code once again. Thank you

Tim Xu Jul 3, 2008 - 11:54 AM

So where can I download the fix? I am facing this issue too.

Technical Support Jul 5, 2008 - 11:09 AM

Here is the fixed method. Just modify it and recompile the library.

void CExtGridCellComboBox::Assign( const CExtGridCell & other )
{
            ASSERT_VALID( this );
            CExtGridCellString::Assign( other );
CExtGridCellComboBox * pCell =
                        DYNAMIC_DOWNCAST(
                                    CExtGridCellComboBox,
                                    ( const_cast < CExtGridCell * > ( &other ) )
                                    );
            ResetContent();
            if( pCell != NULL )
            {
                        // copy cell items
                        ITEM_INFO * pItemCurSel = NULL;
                        LONG nItem = 0;
                        for( nItem = 0; nItem < pCell->m_arrItems.GetSize(); nItem++ )
                        {
                                    ITEM_INFO * pOtherItem = pCell->m_arrItems[ nItem ];
                                    ITEM_INFO * pNewItem = new ITEM_INFO( *pOtherItem );
                                    m_arrItems.Add( pNewItem );
                                    if( pCell->m_pCurSel == pOtherItem )
                                                pItemCurSel = pNewItem;
                        }
                        m_bEnumMode = pCell->m_bEnumMode;
                        SetImageList( pCell->m_pImageList );
                        if( pItemCurSel != NULL )
                        {
                                    nItem = _GetIndexOf( pItemCurSel );
                                    SetCurSel( nItem );
                        }
                        else
                                    pCell->TextGet( m_str );
            } // if( pCell != NULL )
}