Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - How to: Restrictive item editing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to: Restrictive item editing

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: How to: Restrictive item editing
    Posted: 24 September 2007 at 5:02pm
Hi;
I created a report control used to display production records. This control is in read only mode without any possibility to edit data.
Now I want to use the new header row(s) feature to give our users the possibility to filter data by individual columns.
Because the whole control has the AllowEdit() set to FALSE, I'm unable to insert filter terms in the header row cells.
I can't use CXTPReportColumn::EnableEdit(TRUE) because this also enables editing of data rows.
I tried different ways to achieve only a few editable cells in the header row but with no success.
 
So does anyone know how to enable item editing only for a few items of the header row whilst keeping the data rows read only?
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 5:49pm
Hi;
Finally I solved it by myself. I found the HeaderRowsAllowEdit(TRUE) function and the XTP_NM_REPORT_REQUESTEDIT notification message sent to the owner of the control. By setting the bCancel member of the XTP_NM_REPORTREQUESTEDIT structure to TRUE I'm able to cancel the edit operation.
 
But now I have found another serious problem:
When right clicking on the header control of the report a popup menu is shown in my application. So far it works very well, but when editing in the header row is in progress the edit control does not loose focus and stays visible. This behaviour can also be reproduced with the ReportSample sample. Open the HeaderFooterView set the header row to editable, start editing and then right click elsewhere in the control and/or header. The edit control is still visible.
How can this be solved???
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2007 at 1:47pm
Hi,

Call

    GetReportCtrl().EditItem(NULL);

to end inplace editing.

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.