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 » Bug in 2.84 - OnGridCellInputComplete is not called. Collapse All
Subject Author Date
Offer Har Dec 18, 2008 - 4:28 PM

We have cells of type CExtGridCellDropListComboBox. When item selection is changed in the drop list, OnGridCellInputComplete was called up to the 2.84 beta version from November, but in the official release it does not work.


In the official release, it is not called, and we rely heavily on this event.


Please fix ASAP - we cannot release our version like this.


Thanks,


Ron.

Technical Support Apr 24, 2009 - 1:59 PM

This is a known and it is already fixed. Thank you. Please request the update by email.

Philippe Germanier Apr 24, 2009 - 1:52 AM

Hello,


It’s always me ... For information, if you download the sampe Property Grid (click on image for access to the URL), and you try to change the Animation (Middle - Fast - None - ...), that does not work correctly.



  • - If you select new value with the mouse (only), that does not work.

  • - If you click on the cell and you write with keyboard F (for Fast), and Enter, it work.



Best regards.


  philippe

Philippe Germanier Apr 24, 2009 - 1:42 AM

Hello,


This Bug in 2.84 is a really problem for us, because we must build the release of our application.


We don’t want to go back in 2.82 or 2.83. We think that modify the CExtGridCellComboBox::OnPopupListBoxSelEndOK (like in the explanation of Offer Har ... thank you Offer) is the good solution, but before make this modification, it’s really important to us to know the position of the Technical Support of Prof UIS. We don’t want to make this modification if in the next release Prof UIS don’t modify this problem or make differents modifications for solve this problem.


I wait an answer from a Prof UIS Technical Support people.


Best regards.


 philippe

Technical Support Dec 19, 2008 - 11:36 AM

We think, according to your feature request, the correct method is:

 bool CExtGridCellComboBox::OnPopupListBoxSelEndOK(
            CExtPopupInplaceListBox & wndListBox,
            CExtGridCell::TrackCellStateInfo_t & _tcsi
            )
{
            ASSERT_VALID( this );
            ASSERT( (&_tcsi.m_cell) == this );
            ASSERT_VALID( (&wndListBox) );
            ASSERT_VALID( (&_tcsi.m_wndGrid) );
            _tcsi.m_nItemNoSelEndOK = wndListBox.GetCurSel();
            _tcsi.m_bHelperSelChanged = true;
            if( (wndListBox.GetStyle()&LBS_HASSTRINGS) != 0 )
            {
                        LONG nItemCount = wndListBox.GetCount();
                        if( nItemCount > 0L )
                        {
                                    LONG nCurSel = wndListBox.GetCurSel();
                                    if( 0L <= nCurSel && nCurSel < nItemCount )
                                    {
                                                SetCurSel( nCurSel );
                                                CString strSelLbText;
                                                wndListBox.GetText( nCurSel, strSelLbText );
                                                DWORD dwStyleEx = GetStyleEx();
                                                bool bDoNotSendSelEndOkOnEqualText = ( ( dwStyleEx & __EGCS_EX_DO_NOT_NOTIFY_LB_SEL_FOR_EQUAL_TEXT ) != 0 ) ? true : false;
                                                if( bDoNotSendSelEndOkOnEqualText )
                                                {
                                                            CExtSafeString strCurrentText;
                                                            TextGet( strCurrentText );
                                                            if( strCurrentText == LPCTSTR(strSelLbText) )
                                                                        return false;
                                                }
                                                TextSet( LPCTSTR(strSelLbText) );
                                                _tcsi.m_wndGrid.OnGridCellInputComplete( *this, _tcsi.m_nColNo, _tcsi.m_nRowNo, _tcsi.m_nColType, _tcsi.m_nRowType, wndListBox.GetSafeHwnd() );
                                    } // if( 0L <= nCurSel && nCurSel < nItemCount )
                        } // if( nItemCount > 0L )
            } // if( (wndListBox.GetStyle()&LBS_HASSTRINGS) != 0 )
            return false;
}

The __EGCS_EX_DO_NOT_NOTIFY_LB_SEL_FOR_EQUAL_TEXT style was added by your feature request: do not notify about selection in popup list box if the selected text is the same as grid cell text. Your last proposal in this forum thread works with selected item index - not with text. Did you change your feature request?

Fabien Masson Dec 25, 2008 - 10:18 AM

Thanks for this fix.

Since I’m moving from 2.82 to 2.84, I was experiencing same bug.

Regards, Fabien.

Offer Har Dec 19, 2008 - 1:21 PM

I did not change the request... but you have a bug in 2.84.... it’s human to have bugs.


In your code, even if the text is different, the condition to exit is always true, please look at the code again...


 

Technical Support Dec 22, 2008 - 3:01 PM

Yes, but this is fixed in the improved method version in our previous answer in this thread.

Offer Har Dec 22, 2008 - 3:03 PM

OK - so there was a problem... you just provided an alternate solution to what I suggested?

Technical Support Dec 24, 2008 - 7:58 AM

Yes, we did.

Offer Har Dec 18, 2008 - 5:00 PM

I found the bug - it is in CExtGridCellComboBox::OnPopupListBoxSelEndOK lines 34012 onwards:



                bool bSendSelEndOkOnEqualText = ( ( dwStyleEx & __EGCS_EX_DO_NOT_NOTIFY_LB_SEL_FOR_EQUAL_TEXT ) != 0 ) ? true : false;
                if( ! bSendSelEndOkOnEqualText )
                {
                    CExtSafeString strCurrentText;
                    TextGet( strCurrentText );
                    if( strCurrentText == LPCTSTR(strSelLbText) )
                        return false;
                }
		TextSet( LPCTSTR(strSelLbText) );
		_tcsi.m_wndGrid.OnGridCellInputComplete( *this, _tcsi.m_nColNo, _tcsi.m_nRowNo, _tcsi.m_nColType, _tcsi.m_nRowType, wndListBox.GetSafeHwnd() );

The condition of bSendSelEndOkOnEqualText is wrong - you should also check that the selected item is the same as the previous selected item - what happens now, is that the last two lines are nver called...


To fix this I added this line at row 34008:



                int nPrevCurSel = GetCurSel( );
And changed the condition in line 34013:

                if( ! bSendSelEndOkOnEqualText && nCurSel==nPrevCurSel)

Please update the code so everybody will enjoy this fix