CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Several Columns Grid + multiple-selection listbox

Print topic Send  topic

Author Message
Hugo
Posted: 09/12/2002, 12:41 PM

Did someone here try and succeed the following process ?
(from Tips and articles )

Creating multiple-selection listboxes in CCS
By glerma

Several Columns Grid With CCS
By yakli

I use CCS PHP and MySql and I can't success it...


Thanks

Nicole
Posted: 09/16/2002, 2:09 AM

Hugo,
The approach is similar to CC one. Please refer to the following articles for the explanation, while I'll provide the code only
http://www.gotocode.com/art.asp?art_id=115&
http://www.gotocode.com/disc_viewt.asp?mid=5712

Here is some explanation how to do it in CCS:
1. Create Grid form using Grid Builder, uncheck Sorter and Navigator flag to exclude them from the form. Moreover you can delete field caption in html editor.

2. replace <tr> tags with custom template variables:
<!-- BEGIN Row -->
{open}
<td class="PurpleDataTD">{name} </td>
{close}
<!-- END Row -->

3. code part
PHP
- Grid Before Show event:
global $rec_count;
global $DBAccessConn;
$rec_count = CCDLookUp("count(*)", "languages", "1=1", $DBAccessConn)-1;

- Grid form Before Show Row event
global $i;
global $rec_count;
global $Tpl;
if ((int)($i/3) == $i/3)
{
if ($i == 0)
$Tpl->SetVar("open", "<tr>");
else
$Tpl->SetVar("open", "</tr><tr>");
}
else
$Tpl->SetVar("open", "");
if ($i == $rec_count)
$Tpl->SetVar("close", "</tr>");
else
$Tpl->SetVar("close", "");
$i++;


ASP code could be found at:
http://www.gotocode.com/disc_viewt.asp?mid=13505
phpmonkey
Posted: 09/17/2002, 8:36 AM

nicole,
once again you are fabulous.

i made one change to your code as i could not get the Tpl->SetVar to work for me. so i just substituted that for $form_name->tr_open->SetValue("whatever"). but it works perfect.

thanks again.

-code snippit-

global $i;
global $rec_count;
global $ss_item;
if ((int)($i/2) == $i/2)
{
if ($i == 0)
$ss_item->tr_open->SetValue("<tr>");
else
$ss_item->tr_open->SetValue("</tr><tr>");
}else{
$ss_item->tr_open->SetValue("");
}
if ($i == $rec_count)
{
$ss_item->tr_close->SetValue("</tr>");
}else{
$ss_item->tr_close->SetValue("");
}
$i++;

   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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