CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How to GetValue and SetValue for the Text Columns of a listbox?

Print topic Send  topic

Author Message
joejac

Posts: 242
Posted: 03/25/2009, 3:56 PM

Hello,

In a record form I have a listbox where:
The Control Source is: state_no
Data Source Table is: state
Bound Column is: state_no
Text Column is: state_name

I would like to get the state_name and replace it with the corresponding translation, I know how to do the translation, I know how to get the control value of a normal field: $form_name->state_no->GetValue(); to write: $form_name->state_no->SetValue();

But $form_name->state_name->GetValue(); do not work it gives an error "... non-object" so I need to find the correct way to get the value and to write to all the listbox elements in the correct event before they are shown on the record form.

I appreciate a lot if somebody can help me to find the way.

Best regards
joejac
View profile  Send private message
Gena

Posts: 591
Posted: 03/25/2009, 4:31 PM

I don't think that this is possible... Your Listbox ARRAY already generated!

As idea - you need to generate it manually so you can put ANY values you need and do what you want.

Look, I had listbox Spedisci. And I generate it manually in youformname_BeforeShow event like

global $CCSLocales;
$Container->Spedisci->Values = array(array(1, $CCSLocales->GetText("BillTheSame") ),array(2, $CCSLocales->GetText("BillNew")));

you need to understand that Listbox is Array and each element is array of 2 values:
Bound Column (so some ID)
Text Column (so text user will see)

_________________
Gena
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.