|
|
|
|
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.
Subject |
Author |
Date |
|
Andrew Cochran
|
Aug 14, 2006 - 5:33 AM
|
Hi, again!
I have one more problem, but it is with another method in CExtGridCell. I make my class as follows:
class InterCellString : public CExtGridCellString { public: DECLARE_SERIAL(InterCellString) IMPLEMENT_ExtGridCell_Clone(InterCellString, CExtGridCellString) InterCellString(CExtGridDataProvider *pDataProvider = NULL) :CExtGridCellString(pDataProvider) { } virtual ~InterCellString() { } virtual bool OnInplaceControlTextInputVerify( HWND /*hWndInplaceControl*/, CExtGridWnd & wndGrid, LONG /*nVisibleColNo*/, LONG /*nVisibleRowNo*/, LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, __EXT_MFC_SAFE_LPCTSTR /*sTextInitial*/, __EXT_MFC_SAFE_LPCTSTR /*sTextPrevious*/, CExtSafeString & /*sTextNew*/, bool /*bEndEdit*/ ) { wndGrid.OnGridCellInputComplete(*this, nColNo, nRowNo, nColType , nRowType); return true; } protected: private: }; IMPLEMENT_SERIAL(InterCellString, CExtGridCellString, VERSIONABLE_SCHEMA | 1);
I want to know when user is editing the text in the cell, and update it according to every entered symbol. But handler doesn’t work. Please help, where am I wrong?
|
|
Technical Support
|
Aug 14, 2006 - 7:55 AM
|
You should handle both CExtGridCell::OnInplaceControlTextInputVerify() and CExtGridCell::OnInplaceControlTextInputComplete() virtual methods and apply the changed text to your application’s logic.
|
|
Andrew Cochran
|
Aug 15, 2006 - 2:39 AM
|
I see, but the thing is that OnInplaceControlTextInputVerify() method is not being invoked. :(
|
|
Technical Support
|
Aug 15, 2006 - 6:45 AM
|
The OnInplaceControlTextInputVerify() method is not invoked because you forgot to add the const keyword after the method declaration
|
|
Andrew Cochran
|
Aug 16, 2006 - 2:47 AM
|
Sorry for my inattention! :( The problem is now solved. I used OnInplaceControlTextInputComplete insted of OnGridCellInputComplete with parametter sTextNew from OnInplaceControlTextInputVerify().
Thanks, for support!
|
|
Andrew Cochran
|
Aug 16, 2006 - 2:35 AM
|
Oh! Write you are! :) Now all methods are working. But another problem appeared. While not enter pressed on the cell, the text from inplace control does not go to the cell. I call OnGridCellInputComplete in OnInplaceControlTextInputVerify handler to invoke Apply function, it works, but TextGet method returns old text every time until enter pressed. How can I apply the text from inplace edit control to the cell every time in OnInplaceControlTextInputVerify ? (Calling OnGridCellInputComplete does not update it).
|
|