Dale
|
| Posted: 07/31/2002, 6:41 PM |
|
I would like to make a page that can show two products per row in codecharge studio. Anyone know how that can be done?
Thanks
Dale
|
|
|
 |
Nicole
|
| Posted: 08/02/2002, 6:10 AM |
|
Dale,
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
ASP
- declare custom variables which will be used in the code at the very top of PageName_events.asp file, right after asp open tag (<%)
<%
Dim i
Dim rec_count
- Grid Before Show event:
i = 0
rec_count = CCdLookUp("count(*)", "table_name", "1=1", DBconnection_name)
rec_count = rec_count -1
- Grid form Before Show Row event
if int(i/3) = i/3 then
if i = 0 then
EventCaller.TemplateBlock.Block("Row").Variable("open") = "<tr>"
else
EventCaller.TemplateBlock.Block("Row").Variable("open") = "</tr><tr>"
end if
else
EventCaller.TemplateBlock.Block("Row").Variable("open") = ""
end if
if i = rec_count then
EventCaller.TemplateBlock.Block("Row").Variable("close") = "</tr>"
else
EventCaller.TemplateBlock.Block("Row").Variable("close") = ""
end if
i=i+1
|
|
|
 |
Lindsay
|
| Posted: 10/15/2003, 11:07 AM |
|
I do not think I understand completely can you help me.
|
|
|
 |
|