In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

DBComboBox

Xailer professional forum in English
Srdjan
Posts: 111
Joined: Sun Jun 22, 2008 1:39 pm

DBComboBox

Postby Srdjan » Sun Jan 26, 2014 8:22 am

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 ?
Srdjan
Posts: 111
Joined: Sun Jun 22, 2008 1:39 pm

DBComboBox

Postby Srdjan » Sun Jan 26, 2014 9:04 am

Example in attachment

Attached files ADRESE.DBF (281 B)Â Form2.prg (1.8 KB)Â Form2.xfm (1.6 KB)Â
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

DBComboBox

Postby ignacio » Mon Jan 27, 2014 10:07 am

Srdjan escribió el dom, 26 enero 2014 08:22
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 ?

You can initialize them on any of this events:
TDbComboBox:OnCreate
-Or-
TForm:OnInitialize
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Srdjan
Posts: 111
Joined: Sun Jun 22, 2008 1:39 pm

DBComboBox

Postby Srdjan » Mon Jan 27, 2014 8:02 pm

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
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

DBComboBox

Postby ignacio » Tue Jan 28, 2014 11:46 am

Srdjan escribió el lun, 27 enero 2014 20:02
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

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
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Srdjan
Posts: 111
Joined: Sun Jun 22, 2008 1:39 pm

DBComboBox

Postby Srdjan » Tue Jan 28, 2014 3:35 pm

I set nDataType (see attachment) but I have equal problem.

Attached files Form2.xfm (1.7 KB)Â
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

DBComboBox

Postby ignacio » Tue Jan 28, 2014 7:18 pm

Srdjan escribió el mar, 28 enero 2014 15:35
I set nDataType (see attachment) but I have equal problem.

Send the complete project via Project->Export project menu option.
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Srdjan
Posts: 111
Joined: Sun Jun 22, 2008 1:39 pm

DBComboBox

Postby Srdjan » Tue Jan 28, 2014 11:13 pm

Exported project is in attachment. This is simple project for testing.

Attached files Proba.zip (2.6 KB)Â
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

DBComboBox

Postby ignacio » Wed Jan 29, 2014 12:48 pm

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
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info

Return to “English”