Print Page | Close Window

dropdownlist having multiple columns

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=6328
Printed Date: 22 November 2024 at 8:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: dropdownlist having multiple columns
Posted By: rolf
Subject: dropdownlist having multiple columns
Date Posted: 06 February 2007 at 2:58am

i want to create something like i've been using in MS Access (former times):

 
There is a report control item named "Artikel", which should contain a legal articlenumber (e.g. 3141203).
 
The dropdownlist contains two cols :
1. the available articlenumbers
2. the articletext
 
When i select an item out of the dopdownlist (e.g. "3141203 Formteile 1203"), the articlenumber "3141203" is the value that has to occurs in the report control item.
 
In MS Access it's pretty easy : just create a dropdownlist that contains the two fields and tell Access that it should use column 1 (the number) as the result out of a dropdown selection.
 
This is a pretty user friendly form of selecting a sensfull number ...
... but i have no idea how to do that in a report control !?
 
The values added by AddConstraint(...) are not formatable to show two cols. And the return value of the selection process is number + text.
 
Anyone with any idea how to realize this nice feature ?
Thank's for any hints !
 
Rolf
 



Replies:
Posted By: sserge
Date Posted: 02 March 2007 at 3:02am
See method CXTPReportRecordItemEditOptions::AddConstraint(LPCTSTR lpszConstraint, DWORD_PTR dwData)
You can use lpszConstraint - as a part title and dwData as a part number.
 
Just format part title in some nice way (preserve for part number 10 chars for example).
 
If your part number is a string - you can use OnConstraintChanged to parse title and save part.

--
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