Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Horziontal looper in columns

New Here ,
Apr 19, 2007 Apr 19, 2007

Copy link to clipboard

Copied

Hi,
I need a repeat region to run in 2 or 3 columns, afaik the Tom Muck extension will only go
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
where as I need it to go
| 1 | 4 |
| 2 | 5 |
| 3 | 6 |
Does anyone know a workaround or alternative?
Thanks,
Mark.
TOPICS
Server side applications

Views

251
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 19, 2007 Apr 19, 2007
funkster wrote:

> Hi,
> I need a repeat region to run in 2 or 3 columns, afaik the Tom Muck
> extension will only go
> | 1 | 2 |
> | 3 | 4 |
> | 5 | 6 |
> where as I need it to go
> | 1 | 4 |
> | 2 | 5 |
> | 3 | 6 |
> Does anyone know a workaround or alternative?
> Thanks,
> Mark.

I did exactly this in a three column table.

Count the number of records, divide by the required columns

repeat each record down on a new line - when you get to the division
spot enter the code for a new column and ...

Votes

Translate
LEGEND ,
Apr 19, 2007 Apr 19, 2007

Copy link to clipboard

Copied

funkster wrote:

> Hi,
> I need a repeat region to run in 2 or 3 columns, afaik the Tom Muck
> extension will only go
> | 1 | 2 |
> | 3 | 4 |
> | 5 | 6 |
> where as I need it to go
> | 1 | 4 |
> | 2 | 5 |
> | 3 | 6 |
> Does anyone know a workaround or alternative?
> Thanks,
> Mark.

I did exactly this in a three column table.

Count the number of records, divide by the required columns

repeat each record down on a new line - when you get to the division
spot enter the code for a new column and repeat.

<%
CT= Int(country_total)
CTS=Int(country_total)/3
CMS = CT + 1
CME = CTS*2
CRS = CME + 1

varRowCount = 0
Do While varRowCount < CT
Response.Write "<a href='hotel_city.asp?Country=" &
(country.Fields.Item("Country").Value) & "'>" &
(country.Fields.Item("CName").Value) & " Hotel</a><br>"
If varRowCount = Int(CTS) Then response.write "</td><td width='210'
valign='top'>"
If varRowCount = Int(CME) Then response.write "</td><td width='210'
valign='top'>"
Country.MoveNext
varRowCount = varRowCount + 1
Loop
%>

Crude but works and guaranteed to offend the CSS purists!

--
Buzby
There's nothing more dangerous than a resourceful idiot

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 20, 2007 Apr 20, 2007

Copy link to clipboard

Copied

thanks a lot for your response, i will have a go at this today and post back to say how it went...

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

LATEST
got it working with a bit of fiddling.

thanks a lot

mark.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines