Print Page | Close Window

Can't edit in report control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5044
Printed Date: 13 May 2024 at 7:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can't edit in report control
Posted By: garylyb
Subject: Can't edit in report control
Date Posted: 13 September 2006 at 11:25pm
 
I have a report control in a CFormView,
 
It looks like I'm doing the same things as the task list sample

pCol->SetEditable(TRUE);

pCol->GetEditOptions()->m_bAllowEdit = TRUE;

I set allowedit:

m_Report.AllowEdit(TRUE);

m_Report.Populate();
 
 
But, when I click on a cell, it looks like it starts to edit, but when I press a key I always get an exception here:
 
void CXTPReportInplaceEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)

{

CXTPReportControl* _pControl = pControl;

ASSERT(_pControl);

 
Because pControl is NULL
 
I don't know what's going on?
 
 



Replies:
Posted By: garylyb
Date Posted: 14 September 2006 at 7:44am

Something is eating messages here, Here is atrace of the task list sample:

 
<00738> 00A905F0 R WM_NOTIFYFORMAT retCode:NFR_ANSI
<00739> 00A905F0 S WM_NCHITTEST xPos:623 yPos:153
<00740> 00A905F0 R WM_NCHITTEST nHittest:HTCLIENT
<00741> 00A905F0 S message:0x2A48 [User-defined:WM_USER+9800] wParam:00000000 lParam:00000000
<00742> 00A905F0 R message:0x2A48 [User-defined:WM_USER+9800] lResult:00000000
<00743> 00A905F0 S WM_NCHITTEST xPos:620 yPos:148
<00744> 00A905F0 R WM_NCHITTEST nHittest:HTCLIENT
<00745> 00A905F0 S WM_SETCURSOR hwnd:00A905F0 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00746> 00A905F0 R WM_SETCURSOR fHaltProcessing:False
<00747> 00A905F0 P WM_MOUSEMOVE fwKeys:0000 xPos:237 yPos:11
<00748> 00A905F0 S WM_NCHITTEST xPos:620 yPos:148
 
Here is my app:
 
00340> 00B5078E R WM_SETCURSOR fHaltProcessing:False
<00341> 00B5078E S WM_NCHITTEST xPos:407 yPos:548
<00342> 00B5078E R WM_NCHITTEST nHittest:HTCLIENT
<00343> 00B5078E S WM_NCHITTEST xPos:407 yPos:548
<00344> 00B5078E R WM_NCHITTEST nHittest:HTCLIENT
<00345> 00B5078E S WM_SETCURSOR hwnd:00B5078E nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE
<00346> 00B5078E R WM_SETCURSOR fHaltProcessing:False
<00347> 00B5078E P WM_MOUSEMOVE fwKeys:0000 xPos:180 yPos:32
<00348> 00B5078E P WM_PAINT hdc:00000000
<00349> 00B5078E S WM_NCHITTEST xPos:407 yPos:548
 
These messages are missing:
 
<00742> 00A905F0 R message:0x2A48 [User-defined:WM_USER+9800] lResult:00000000
 
This is a tab in a

CXTPTabControl

in an mdi window.
 
Gary
 


Posted By: Oleg
Date Posted: 14 September 2006 at 11:45am
Hello,
 
This problem can appear beacuse of clip styles - check that report, tabcontrol and view have WS_CLIPSIBLINGS|WS_CLIPCHILDREN styles


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: garylyb
Date Posted: 14 September 2006 at 3:40pm

I just uploaded a file in the support area that demonstrates the problem.

OnInitialUpdate gets hit twice, the report control can't be edited, the windows are all set to WS_CLIPSIBLINGS|WS_CLIPCHILDREN

I can't get any farther until this gets resolved.

Thank you

Gary



Posted By: Oleg
Date Posted: 15 September 2006 at 1:14am
Hi,
 
You didn't copy one method from our sample:
 

ON_WM_MOUSEACTIVATE()

...

int CTest1View::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)

{

return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);

}

 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Oleg
Date Posted: 15 September 2006 at 1:15am
About WM_INITIALUPDATE - just comment

pWnd->SendMessage(WM_INITIALUPDATE)

in CTest1View::AddView. We fixed it in our sample too.
Thanks.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: garylyb
Date Posted: 17 September 2006 at 9:36am
Thank you very much, I looked at the OnMouseActivate several times, and kept saying it doesn't do anything, so I ignored it.
 
It does, however, call CWnd instead of CView, so once that finally sunk in, I added it.
 
Thanks again,
 
Gary
 


Posted By: TerryT
Date Posted: 15 October 2006 at 7:46am
Ditto on the "finally sunk in"
 
Restored the "OnMouseActivate()", all is fine!
Thx!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net