My Radio Menu object has three values: "COUNTY", "STATE", and "NEITHER",
which I understand would correspond to an oDBRadioMenu:nIndex value of 1, 2,
or 3.
To try to get the control to display the database value, in the onCreate
event of the control, I have:
do case
case ::oDBRadioMenuRecipient:Value == "COUNTY"
::oDBRadioMenuRecipient:nIndex := 1
case ::oDBRadioMenuRecipient:Value == "STATE"
::oDBRadioMenuRecipient:nIndex := 2
case ::oDBRadioMenuRecipient:Value == "NEITHER"
::oDBRadioMenuRecipient:nIndex := 3
endcase
To try to get the control to return the correct string value, in the
onChange event of the control, I have:
do case
case ::oDBRadioMenuRecipient:nIndex == 1
::oDBRadioMenuRecipient:Value := "COUNTY"
case ::oDBRadioMenuRecipient:nIndex == 2
::oDBRadioMenuRecipient:Value := "STATE"
case ::oDBRadioMenuRecipient:nIndex == 3
::oDBRadioMenuRecipient:Value := "NEITHER"
endcase
This doesn't seem to work properly in that the form doesn't display the
corresponding radio button as selected when I show that record and still
returns the nIndex value to the oDataSet field, rather than the string
value. I guess I need an example of how to use the RadioMenu control
properly.
TIA,
Gary S. Rogers
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.
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.
Need example of how to work with TDBRadioMenu control
-
- Mensajes: 202
- Registrado: Dom Feb 17, 2008 3:35 am
- ignacio
- Site Admin
- Mensajes: 9440
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Need example of how to work with TDBRadioMenu control
Gary,
The underlying database field must be a numeric field that acepts the
values: 1, 2 or 3.
To change the value to COUNTY you should do:
oDBRadio:Value := 1
OR
oDbRadio:nIndex := 1
If you database field has the complete strings I suggest you use TDbListBox
o TDbComboBox with the property nDataType set to dtBOUND. Consult the docs.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:48e69a85$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> My Radio Menu object has three values: "COUNTY", "STATE", and "NEITHER",
> which I understand would correspond to an oDBRadioMenu:nIndex value of 1,
> 2, or 3.
>
> To try to get the control to display the database value, in the onCreate
> event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:Value == "COUNTY"
> ::oDBRadioMenuRecipient:nIndex := 1
> case ::oDBRadioMenuRecipient:Value == "STATE"
> ::oDBRadioMenuRecipient:nIndex := 2
> case ::oDBRadioMenuRecipient:Value == "NEITHER"
> ::oDBRadioMenuRecipient:nIndex := 3
> endcase
>
> To try to get the control to return the correct string value, in the
> onChange event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:nIndex == 1
> ::oDBRadioMenuRecipient:Value := "COUNTY"
> case ::oDBRadioMenuRecipient:nIndex == 2
> ::oDBRadioMenuRecipient:Value := "STATE"
> case ::oDBRadioMenuRecipient:nIndex == 3
> ::oDBRadioMenuRecipient:Value := "NEITHER"
> endcase
>
> This doesn't seem to work properly in that the form doesn't display the
> corresponding radio button as selected when I show that record and still
> returns the nIndex value to the oDataSet field, rather than the string
> value. I guess I need an example of how to use the RadioMenu control
> properly.
>
> TIA,
> Gary S. Rogers
The underlying database field must be a numeric field that acepts the
values: 1, 2 or 3.
To change the value to COUNTY you should do:
oDBRadio:Value := 1
OR
oDbRadio:nIndex := 1
If you database field has the complete strings I suggest you use TDbListBox
o TDbComboBox with the property nDataType set to dtBOUND. Consult the docs.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:48e69a85$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> My Radio Menu object has three values: "COUNTY", "STATE", and "NEITHER",
> which I understand would correspond to an oDBRadioMenu:nIndex value of 1,
> 2, or 3.
>
> To try to get the control to display the database value, in the onCreate
> event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:Value == "COUNTY"
> ::oDBRadioMenuRecipient:nIndex := 1
> case ::oDBRadioMenuRecipient:Value == "STATE"
> ::oDBRadioMenuRecipient:nIndex := 2
> case ::oDBRadioMenuRecipient:Value == "NEITHER"
> ::oDBRadioMenuRecipient:nIndex := 3
> endcase
>
> To try to get the control to return the correct string value, in the
> onChange event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:nIndex == 1
> ::oDBRadioMenuRecipient:Value := "COUNTY"
> case ::oDBRadioMenuRecipient:nIndex == 2
> ::oDBRadioMenuRecipient:Value := "STATE"
> case ::oDBRadioMenuRecipient:nIndex == 3
> ::oDBRadioMenuRecipient:Value := "NEITHER"
> endcase
>
> This doesn't seem to work properly in that the form doesn't display the
> corresponding radio button as selected when I show that record and still
> returns the nIndex value to the oDataSet field, rather than the string
> value. I guess I need an example of how to use the RadioMenu control
> properly.
>
> TIA,
> Gary S. Rogers
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Need example of how to work with TDBRadioMenu control
Gary,
The underlying database field must be a numeric field that acepts the
values: 1, 2 or 3.
To change the value to COUNTY you should do:
oDBRadio:Value := 1
OR
oDbRadio:nIndex := 1
If you database field has the complete strings I suggest you use TDbListBox
o TDbComboBox with the property nDataType set to dtBOUND. Consult the docs.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:48e69a85$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> My Radio Menu object has three values: "COUNTY", "STATE", and "NEITHER",
> which I understand would correspond to an oDBRadioMenu:nIndex value of 1,
> 2, or 3.
>
> To try to get the control to display the database value, in the onCreate
> event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:Value == "COUNTY"
> ::oDBRadioMenuRecipient:nIndex := 1
> case ::oDBRadioMenuRecipient:Value == "STATE"
> ::oDBRadioMenuRecipient:nIndex := 2
> case ::oDBRadioMenuRecipient:Value == "NEITHER"
> ::oDBRadioMenuRecipient:nIndex := 3
> endcase
>
> To try to get the control to return the correct string value, in the
> onChange event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:nIndex == 1
> ::oDBRadioMenuRecipient:Value := "COUNTY"
> case ::oDBRadioMenuRecipient:nIndex == 2
> ::oDBRadioMenuRecipient:Value := "STATE"
> case ::oDBRadioMenuRecipient:nIndex == 3
> ::oDBRadioMenuRecipient:Value := "NEITHER"
> endcase
>
> This doesn't seem to work properly in that the form doesn't display the
> corresponding radio button as selected when I show that record and still
> returns the nIndex value to the oDataSet field, rather than the string
> value. I guess I need an example of how to use the RadioMenu control
> properly.
>
> TIA,
> Gary S. Rogers
The underlying database field must be a numeric field that acepts the
values: 1, 2 or 3.
To change the value to COUNTY you should do:
oDBRadio:Value := 1
OR
oDbRadio:nIndex := 1
If you database field has the complete strings I suggest you use TDbListBox
o TDbComboBox with the property nDataType set to dtBOUND. Consult the docs.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:48e69a85$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> My Radio Menu object has three values: "COUNTY", "STATE", and "NEITHER",
> which I understand would correspond to an oDBRadioMenu:nIndex value of 1,
> 2, or 3.
>
> To try to get the control to display the database value, in the onCreate
> event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:Value == "COUNTY"
> ::oDBRadioMenuRecipient:nIndex := 1
> case ::oDBRadioMenuRecipient:Value == "STATE"
> ::oDBRadioMenuRecipient:nIndex := 2
> case ::oDBRadioMenuRecipient:Value == "NEITHER"
> ::oDBRadioMenuRecipient:nIndex := 3
> endcase
>
> To try to get the control to return the correct string value, in the
> onChange event of the control, I have:
>
> do case
> case ::oDBRadioMenuRecipient:nIndex == 1
> ::oDBRadioMenuRecipient:Value := "COUNTY"
> case ::oDBRadioMenuRecipient:nIndex == 2
> ::oDBRadioMenuRecipient:Value := "STATE"
> case ::oDBRadioMenuRecipient:nIndex == 3
> ::oDBRadioMenuRecipient:Value := "NEITHER"
> endcase
>
> This doesn't seem to work properly in that the form doesn't display the
> corresponding radio button as selected when I show that record and still
> returns the nIndex value to the oDataSet field, rather than the string
> value. I guess I need an example of how to use the RadioMenu control
> properly.
>
> TIA,
> Gary S. Rogers