CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Default Listbox value in editable grid

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 05/11/2009, 2:43 PM

I have an editable grid showing four rows.. so on Insert it will enter 4 records.

I need to set the value of Listbox1 for each row to be A, B, C and D consecutively.

I can do a Before Show Row but how do I tell it to look at the previous row for the value, then go to the next? Or is there an easier way?

Thanks!

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
melvyn


Posts: 333
Posted: 05/11/2009, 4:14 PM

Remember BeforeShowRow is a server side event.

  
if(strlen($listbox_value) == 0){ // there's no parent row, this is the first one.  
   $listbox_value = <do something>;  
}else{  
   //   
}  
  
// This will take the value from the current row and store it in $listbox_value.  
$listbox_value = $Component->listbox->GetValue();  
  
if($listbox_value == <your conditions here>){  
  $listbox_value = <calculate something>;  
  
  // set the row listbox value taken from the above calculations  
  $Component->listbox->SetValue($listbox_value);  
}else{  
  // do something  
}  

The above illustrate and provides some mockup. You need to implement and get it working.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
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.