Simon Wall
|
| Posted: 01/13/2003, 3:22 PM |
|
Hi, I am trying to get a grid with 2 colums to show a list of categories for the user to choose from. I have fiddled around with a few examples on here and I can't seem to get anything to work. I am using ASP 3 with Templates on CCS.
I have produced a basic project folder zipped it up and uploaded it to http://www.malevolus.com/test.zip . If at all possible could someone have a look at it, change it to work with multiple columns and give me a brief description of what has been done and email it back to me atrecedo@eurobell.co.uk .
I would really appreciate it if someone could do this, as I am sure it will end up being fairly simple but no matter what I try I just can't get it to work. In return I will write an article about how to do it for newbies, as the one I read is a bit hard to understand.
Thankyou very much in advance
Simon Wall
|
|
|
 |
Simon
|
| Posted: 01/14/2003, 8:25 AM |
|
Not meaning to hassel anyone here, but can anyone help me with this? I would't normally get this impatient, but I need to sort this out before I can continue with my current project!
Anyone, help, pleeeeaaaasssse! I'm desperate *stares at the bottle of poison on the shelf*
Thanks
Simon
|
|
|
 |
RonB
|
| Posted: 01/14/2003, 8:36 AM |
|
http://www.gotocode.com/art.asp?art_id=189&
Ron
|
|
|
 |
Simon
|
| Posted: 01/15/2003, 2:50 AM |
|
I have had a look at that and I find it a bit hard to understand. I'll have another go though.
What exactly does: and "define Public i on the top of your page" mean? I got ccs because I really wanted to do as little actual asp programming as possible as I am a bit lazy and can't seem to stick long enough to actually learn the language properly. I realise that certain aspects HAVE to be hand coded though, but it is a great program.
Thanks for that
Simon
|
|
|
 |
Simon
|
| Posted: 01/15/2003, 3:07 AM |
|
right, I have a grid like so:
<!-- BEGIN Grid template_cat -->
<table style="BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 8pt; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Verdana; BORDER-RIGHT-WIDTH: 1px">
<a href="{Link2_Src}">{Link2}</a>
<td style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><a href="{link1_Src}">{link1}</a></td>
</table>
<!-- END Grid template_cat -->
and custom code like so:
Function template_cat_Link2_BeforeShow() 'template_cat_Link2_BeforeShow @4-5CD11421
'Custom Code @6-73254650
' -------------------------
Dim point
point = i/3
'response.write "i: "& i & " point: " & InStr(point, ",") & "<br>"
if InStr(point, ",") = 0 then
NewGrid2.link2.Value = "</tr><tr>"
else
NewGrid2.link2.Value = ""
end if
i = i+1
' -------------------------
'End Custom Code
End Function 'Close template_cat_Link2_BeforeShow @4-54C34B28
with it like that I get this error:
Microsoft VBScript runtime error '800a01a8'
Object required: 'RowBlock'
/please_work/NewPage1.asp, line 180
as I said I'm not sure what "define Public i on the top of your page" means, but I had a guess at it being a "dim i" statement. With that in place I got the same error. By the way I put that statement on the newpage1_events.asp page, is that correct?
Any help on this problem would be great! Thanks
Simon Wall
|
|
|
 |
simon
|
| Posted: 01/15/2003, 3:21 AM |
|
ok, so I fixed a few stupid mistakes, I changed newgrid2 to template_cat1 which was my grid name (duhhh) and left the <!-- BEGIN Row --> and <!-- END Row --> comments in and I got just a list, ie
cat name 1
Cat name 2
Cat name 3
and so on
are there any stipd things I have done now, which should stop this from working?
Thanks again
Simon
|
|
|
 |
simon
|
| Posted: 01/15/2003, 3:25 AM |
|
If it helps I uncommented the response.write line and got
i: point: 0
i: 1 point: 0
i: 2 point: 0
i: 3 point: 0
i: 4 point: 0
i: 5 point: 0
i: 6 point: 0
at the top of the page
|
|
|
 |
Simon
|
| Posted: 01/15/2003, 3:51 AM |
|
By mucking around with the <tr> tags, well changing them to <td>'s (in the custom code) I can get the links to go across:
cat name 1 Cat name 2 Cat name 3 Cat name 4 etc
That will be useful for menus etc.
Simon
|
|
|
 |
Simon
|
| Posted: 01/15/2003, 3:57 AM |
|
Hopefully all this info will help someone to help me!
One last thing, I put 1's around link1 and 2's around link2 (in design view) just to see what happened and I got:
2
2
2
2
2
2
2
1Free1 2
1Cheapies1 2
1Fun1 2 2
1Business1 2
1Simple1 2
1Graphical1 2
1ASP1
This looks like it's not even printing link 2 at all, both of them have the control source set to cat_name which is the category names and both have data type as text and content to html.
Please help me, I'm buggered if I know whats happening. Or can someone make a simple ccs file and email it to me so I can see what it should be like!recedo@eurobell.co.uk.
Thanks
Simon Wall
|
|
|
 |
Simon
|
| Posted: 01/16/2003, 1:51 AM |
|
I was up all night again last night and this is really starting to bug me Surely someone knows how to do this?
Thanks
|
|
|
 |
Dati
|
| Posted: 01/16/2003, 3:05 AM |
|
hate to see a grown man cry
ron's reference to online solution is always going to cause problems if you are not happy with programming your own code
my suggestion, if you only want 2 columns is
use alternate row setting in Grid Builder
then edit the HTML code by removing <tr> and <td> as necessary, + changing classes as reqd.
something like
<!-- BEGIN Row -->
<tr>
<td class="">{Category}</td>
<!-- END Row -->
<!-- BEGIN AltRow -->
<td class="">{Alt_Category}</td>
</tr>
<!-- END AltRow -->
should do you
good luck
Dati
|
|
|
 |
Simon
|
| Posted: 01/16/2003, 3:50 AM |
|
Worked first time, amazing! Cheers
I'm sure I have tried that before though, maybe it was because I change the actual table in dreamweaver instead of taking the tags out manually??
Well thanks anyway, it works, YIPPIE!
Simon
|
|
|
 |