|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 2 of 2 total|
|Wed, Oct 16 2013 10:29 PM||Permanent Link|
I'm just wondering what is the best way of using a TCombobox while waiting for the Lookup Combobox. I see that the TCombobox can be bound to a dataset field, but I'm not sure how to use it.
My database contains only codes or id's to data in another table in certain fields. I mean, that is the only way to design a good databases.
Lets say we have TABLE_A. Table A have some normal text and integer fields and a field called SEVERITY_ID. The next table is called SEVERITY. It has the SEVERITY_ID field and a SEVERITY_NAME field. It is linked to TABLE_A on the SEVERITY_ID field.
In my app I want the user to choose from the TCombobox the values from table SEVERITY, but only SEVERITY_ID should be stored in TABLE_A. As I understand, I cannot bind the TCombobox to a dataset field, because then only the ID will be displayed. I'm aware that I can manually populate the TCombobox, but the ID's are not consistent. Lets say they are 1,2,7,12 and 55. Where can I store that value? ItemIndex is an property that is automatically populated every time I call Add() and start on 0 right? Also, when the user browse the dataset, I want the TCombobox to show the SEVERITY_NAME and change it as the user continue to browse.
I'm a little lost here. a TLookupCombobox would solve and take care of all this. Do I have to pop up another form with a Grid to display the choices and have a joined text field showing the text values during browsing?
I'm sure that there are several of you out there that have done this before as this is a pretty common practice to store only ID's of the other table in the database.
Thanks for any help
|Thu, Oct 24 2013 4:19 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< I'm a little lost here. a TLookupCombobox would solve and take care of
all this. Do I have to pop up another form with a Grid to display the
choices and have a joined text field showing the text values during
Yes, that's really the best option at this point. I'm going to be
re-writing the TListBox (which is used with the TComboBox) shortly to be
more like the grid, and that will allow this type of functionality.
This web page was last updated on
Saturday, June 3, 2023 at 10:17 AM
© 2023 Elevate Software, Inc. All Rights Reserved
Questions or comments ? E-mail us at email@example.com