This topic is locked
[SOLVED]

 Hiding Columns

2/2/2011 11:20:32 PM
PHPRunner General questions
P
procheck author

I have about 50 columns in a table but I only want to display half of them depending on the transaction.

I've tried the following with no success:
$xt->assign("Name_fieldblock",false);
$xt->assign("Name_fieldheadercolumn",false);
$xt->assign("Name_fieldcolumn",false);
Is there a reliable way to do this or would I be better off using views?
Thanks
Al

P
procheck author 2/4/2011

I was able to find the solution. All of the examples I read were trying to hide columns with empty fields. My column fields were initialized to zero. By looking at the Cars example generated code, I saw $row["fieldname_fieldcolumn"]=false; in the After Record Processed event. By using this, it hid the values for this column, then I was able to use $xt->assign("fieldname_fieldheadercolumn",false); in the Before Display event.