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 Gallery

Print topic Send  topic

Author Message
Damian Small
Posted: 06/13/2002, 4:05 PM

Can anyone help me with te several columns grid example. I can get it to work as it supposed too with either templates or without. However if I attempt to add another row the columns revert to a vertical list. What I would like to do is have
Image/Name Image/Name Image/Name
Image/Name Image/Name Image/Name

as soon as I add <tr> it reverts to a vertical list. Im using Codecharge 2.0.

Any ideas?? PHP or ASP.





Ken Hardwick
Posted: 06/13/2002, 6:14 PM

Damian,

I had put togeather something of this nature a while back..

see it at...
http://www.kenhardwick.com/events/images.asp

This was just a very basis example and most likely needs more work...but if it
is anywhere close to what you are trying to do...I will be glad to work with
you on this..

ken@kenhardwick.com




Damian Small
Posted: 06/14/2002, 6:45 AM

First of all thanks to Elana's Several columns grid example. I got it work and here is my simplest example. Ive kept it as simple as possible so it can be adapted.
This example is using ASP and templates.
Created a page with a grid form and two fields from the database one the Image_URL and two the JobName. Image_URL is hidden. JobName is label. Included page navigation showing 12 records. Set tabular. Form name is Stock.

---------------
Open Event
---------------
i = 0

---------------
Custom Show Event
---------------
'replaced obtained code with the following

point = i/4
if InStr(point, ".") = 0 then

SetVar "OPEN", "<tr>"
else
SetVar "OPEN", ""
end if

SetVar "NEW", "<td><table border=""1""><tr><td><img border=0 src=" & fldImage_url & "></td></tr><tr><td><font style=font-family: Arial, Tahoma, Verdana, Helvetica; color=""#666699""; font-size: 10pt><b>"& fldJobName&"</b></font></td></tr></table>"

Parse "DListStock", True
i=i+1


Opened the HTML template and replaced the code between
<!--BeginDListStock-->

<!--EndDListStock-->

with {OPEN}{NEW}</tr>

Page displays a 4 x 3 image grid with the jobname under each image. With navigation.
As you can see its Elana's code. Ive only done very limited testing and Ive only tested it with IE.

Thanks Ken for your offer im sure a lot people are looking for an example like this. Any comments on how it could be tidied up I would appreciate.

Regards Damian Small


antman
Posted: 06/24/2002, 6:34 AM

Add <table><tr><td> in your form header
Add </td></tr></table> in your form footer

add in the before show event (pseudocode here):

numberofcols=numberofcols+1
if (numberofcols>whatyouwant) then
output("</td></tr><tr><td>")
numberofcols=0
end if

don't forget to set numberofcols=0 after you display the table

mickey
Posted: 07/24/2003, 11:42 PM

can you give me the code where in (img border=0 src=" & fldImage_url & ") will display my pictures which rest in users/ directory

   


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.