Print Page | Close Window

How to: Restrictive item editing

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=8146
Printed Date: 28 September 2024 at 6:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to: Restrictive item editing
Posted By: mgampi
Subject: How to: Restrictive item editing
Date 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



Replies:
Posted By: mgampi
Date 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


Posted By: sserge
Date Posted: 03 October 2007 at 1:47pm
Hi,

Call

    GetReportCtrl().EditItem(NULL);

to end inplace editing.

--
WBR,
Serge



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