Board index » cppbuilder » Changing displaying value with TDBComboBox
Star
![]() CBuilder Developer |
Star
![]() CBuilder Developer |
Changing displaying value with TDBComboBox2007-07-26 03:04:59 AM cppbuilder31 Hi, I am using a TDBComboBox control for displaying certain field from a table in a db. The possible values 0..255 What I need to do is instead of displaying the real value from the db, I have to show that value+1. e.g. If we have in the database the value 2, the combobox should display 3. Besides that, if the user select that 3 from the drop-down list, the value that should be stored in the database will be 2. Is there an easy way of doing that? Thanks |
Giuliano
![]() CBuilder Developer |
2007-07-26 03:55:46 PM
Re:Changing displaying value with TDBComboBox
Il Wed, 25 Jul 2007 15:04:59 -0400, Star < XXXX@XXXXX.COM >ha scritto:
Quote
OnSetText events with appropriate code. Upon displaying, you have to show a modified version of the value of the real data field. When you modify the calculated field, you have to reflect the changes onto the data field, obviously after you have made the appropriate calculations. This should work fine, especially if you hide the underlying field, setting his Visible property to false. Regards Giuliano |
Star
![]() CBuilder Developer |
2007-07-26 10:17:46 PM
Re:Changing displaying value with TDBComboBox
Thanks a lot, Giuliano. I'll try that.
Giuliano wrote: QuoteIl Wed, 25 Jul 2007 15:04:59 -0400, Star < XXXX@XXXXX.COM >ha scritto: {smallsort} |