Ian Branch 128 Posted November 25, 2021 Hi Team, TDBCombobox may not be the right component to use here... At data input time in a separate App I have a TComboBox that has its index value saved to a field. The TComboBox has 5 options, therefore 0 - 4 is saved in the field. I now want to go in reverse and based on the field value show the relevant option. If I use TDBComboBox all I see is 0 - 4. Is there something I can do with TDBComboBox to achieve what I want or do I need to use a different component? Regards & TIA, Ian Share this post Link to post
Uwe Raabe 2064 Posted November 25, 2021 Create handlers for the DB fields OnGetText and OnSetText events and do the conversion inside. Note that the DBComboBox Items property still needs the list of valid text entries to select from. Share this post Link to post
Ian Branch 128 Posted November 25, 2021 Tks Uwe, I figured the Items needed to be there, I just wasn't sure how to make them appear for their relevant field value. Ian Share this post Link to post
Stano 143 Posted November 25, 2021 TDBComBox without items amazed me too. If you have TMS, use it. Share this post Link to post