Print Page | Close Window

RemoveConstraint ???

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4639
Printed Date: 28 September 2024 at 7:51pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RemoveConstraint ???
Posted By: adico
Subject: RemoveConstraint ???
Date Posted: 21 July 2006 at 3:00pm
I have the following:

CXTPReportColumn*    m_pColumn;
m_pColumn->GetEditOptions()->AddConstraint(strTemp, (DWORD)pTemp);


I want to be able to remove all the constraints & re-populate m_pColumn everytime the user selects a constraint from the list.

How can I delete all the constraints from  m_pColumn?


Thanks in advance





-------------
I am not my memories...I am my dreams!



Replies:
Posted By: Oleg
Date Posted: 21 July 2006 at 3:58pm
Hi,
 
try something like m_pColumn->GetEditOptions()->GetConstraints()->RemoveAll();


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


Posted By: adico
Date Posted: 21 July 2006 at 4:57pm
Oleg,
Thanks for your prompt reply. I've got one more "quick" question.

How do I get the index of the Constraint selected by the user. In other words, inside my m_pColumn I have 5 Items. I would like to get the index of the Item the user selects.




-------------
I am not my memories...I am my dreams!


Posted By: Oleg
Date Posted: 21 July 2006 at 5:01pm
Hi,
You can override void CXTPReportRecordItem::OnConstraintChanged(XTP_REPORTRECORDITEM_ARGS* pItemArgs, CXTPReportRecordItemConstraint* pConstraint)
to catch event when constraint changed.
 
and call pConstrint->GetIndex()


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



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