Página 1 de 1

DBComboBox

Publicado: Dom Ene 26, 2014 8:22 am
por Srdjan
I have numeric field in table (ZIP), two array
aTowns := { "Bepgrad", "Nis", "Novi Sad", "Kragujevac", "Kraljevo" }
aZIPs := { 11000, 18000, 21000, 34000, 36000 }
How I must sets aItems and aItemsBound in DBComboBox ?
Which event I use for settings this properties ?

DBComboBox

Publicado: Dom Ene 26, 2014 9:04 am
por Srdjan
Example in attachment

Attached files ADRESE.DBF (281 B)Â Form2.prg (1.8 KB)Â Form2.xfm (1.6 KB)Â

DBComboBox

Publicado: Lun Ene 27, 2014 10:07 am
por ignacio
Srdjan escribió el dom, 26 enero 2014 08:22I have numeric field in table (ZIP), two array
aTowns := { "Bepgrad", "Nis", "Novi Sad", "Kragujevac", "Kraljevo" }
aZIPs := { 11000, 18000, 21000, 34000, 36000 }
How I must sets aItems and aItemsBound in DBComboBox ?
Which event I use for settings this properties ?
You can initialize them on any of this events:
TDbComboBox:OnCreate
-Or-
TForm:OnInitialize
Regards,

DBComboBox

Publicado: Lun Ene 27, 2014 8:02 pm
por Srdjan
ETHOD Combobox1Create( oSender ) CLASS TForm2
oSender:aitems := {"Beograd","Nis","Novi Sad","Kragujevac","Kraljevo"}
oSender:aItemsbound := { 11000, 18000, 21000, 34000, 36000 }
RETURN Nil
This not work.
Please see examples in attachment.
When program start Xailer IDE send this:
#1: XAILER Warning: Incorrect type on field ZIP, type: N
and I see only Beograd

DBComboBox

Publicado: Mar Ene 28, 2014 11:46 am
por ignacio
Srdjan escribió el lun, 27 enero 2014 20:02ETHOD Combobox1Create( oSender ) CLASS TForm2
oSender:aitems := {"Beograd","Nis","Novi Sad","Kragujevac","Kraljevo"}
oSender:aItemsbound := { 11000, 18000, 21000, 34000, 36000 }
RETURN Nil
This not work.
Please see examples in attachment.
When program start Xailer IDE send this:
#1: XAILER Warning: Incorrect type on field ZIP, type: N
and I see only Beograd
See the docs please. (We are really proud of them )Take a look at TDbComboBox:aItemsBound
Regards,
Note: The property nDataType is not set on your XFM file.



Attached files

DBComboBox

Publicado: Mar Ene 28, 2014 3:35 pm
por Srdjan
I set nDataType (see attachment) but I have equal problem.

Attached files Form2.xfm (1.7 KB)Â

DBComboBox

Publicado: Mar Ene 28, 2014 7:18 pm
por ignacio
Srdjan escribió el mar, 28 enero 2014 15:35I set nDataType (see attachment) but I have equal problem.
Send the complete project via Project->Export project menu option.

DBComboBox

Publicado: Mar Ene 28, 2014 11:13 pm
por Srdjan
Exported project is in attachment. This is simple project for testing.

Attached files Proba.zip (2.6 KB)Â

DBComboBox

Publicado: Mié Ene 29, 2014 12:48 pm
por ignacio
Hello,
Sorry to be so emphatic, but again the answer is on the DOCS and in the same page.

BTW, oComboBox1:lEditable should be TRUE of course.
Regards,
Note: Docs do not bite


Attached files