CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 reference control names programatically

Print topic Send  topic

Author Message
dekacode

Posts: 53
Posted: 04/18/2005, 8:02 PM

PHP, MySQL
editable grid (Crosstab)
custom insert/update functions

Is it possible to reference the grid column names programatically, ie. to loop through all the controls

for ($id=0; $id<$MAX_COL; $id++)
{
$index = "col_name" . $id;
echo $my_grid->column[$index]->GetValue();
}

instead of
$my_grid->col_name0
$my_grid->col_name1
View profile  Send private message
mrachow


Posts: 509
Posted: 04/25/2005, 3:45 AM

You could try something like
eval('echo $my_grid->column' . $index . '->GetValue();');

_________________
Best regards,
Michael
View profile  Send private message
Curtis
Posted: 07/27/2005, 7:25 AM

http://forums.codecharge.com/posts.php?post_id=60507

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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