tomasz
Posts: 11
|
Posted: 09/15/2004, 12:21 AM |
|
there was a sample solution on gotocode tips&tricks (btw: where is this site?)
you have to make some modifications in open and custom show events of the grid form, and also in your html page template (i mean you use php+templates).
in html template:
eg. if row in your table looks like this:
<tr>
<td><font class=DataFONT>{your_field}</font></td>
</tr>
change it to something like that:
{open}
<td><font class=DataFONT>{your_field}</font></td>
then generate content in form custom show event, find line which parses your form, it looks smth like this:
$tpl->parse("DListyour_form", true);
and BEFORE this line enter the following code:
$point = $i/3;
if (strpos($point, ".") == "")
$tpl->set_var("open", "</tr><tr>");
else
$tpl->set_var("open", "");
also AFTER line which parses your form, add $i counter increase:
$i++;
last modification should be added in form open event:
$i = 0;
this should work (works for me). example above displays 3 columns, if you want more, change line $point = $i/3; to what you need.
_________________
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
my windows is stable, becouse i reinstall it very often
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |