Making Repeated Regions Dynamically

This tutorial shows how to make use of the repeated regions in Ultradev dynamically with just some simple adjustments to the code. Complete with pictures and a working example link. (sorry, the link is not available anymore)

I had some troubles with making repeated regions in two or more colums next to each other in order to get a better layout
of my page (reading from 1 database table or more). Normally you would repeat a region in one column and it will repeat for the value that you assigned to it.

I tried some things out, but the problem was the nested table, so i found this solution to make it work.

First of all create a 2 column table:

Then create two seperate tables and add the in both the same recordset that you wish to repeat and add the
repeated region behavior (it is not important to set the repeat record nbr, because we will change it afterwards):

Then you will drag and drop the two tables into the 2 column table we created before:

Now we have to take a look at the html output and see if all the .asp code is at her proper place within
the tables we just dragged and dropped:

Check if your code generated is at the same place as shown above, if not change it (copy/paste) and save your document (don't use
live data viewing, because ultradev will re-adjust the code). You see there are two pieces of code generated (repeat1 and repeat2).

Now we have to determine how many repeated records there are, because we need this to determine the repeat num_rows
and index for each repeated region. In this example i have 6 records, so that is why i divided it in to 2 tables (3/3). If you have more records
you obvisously have change your table lay-out to make it work for you.

Now go find above the opening html tag of your page and find this code, which is the instruction for the repeated region:

 

Change the settings to the lay-out you want. I have 6 records to show, 3 in the first column and 3 the second column.
For the first table i change the Repeat1_numRows to 3 (it counts 3 records) and set the Repeat1_Index to 0 (start with the first record).
For the second table i change the Repeat2_NumRows to 3 (it counts 3 records) but only i will let it start with a Repeat2_Index of 3
(it will start counting from of record 3).

Your page would look something like this:

Now you can make a great indexpage that has different columns that are appropiate for its use (products/markets/links etc etc) and
be nicely categorized.

View the example (only the links receivers and ham base stations work !)

 

Marcellino Bommezijn

Marcellino BommezijnMarcellino Bommezijn is one of the managers at dmxzone.com. He is a contributor on the tutorials section.

Owner of Senzes Media (http://www.activecontent.nl) which provides professional services and web applications for mid-sized companies.

ActiveContent CMS is the ASP.NET Content Management solution that is used for building professional and rich-featured websites.

See All Postings From Marcellino Bommezijn >>

Comments

very good

April 15, 2001 by George Petrov
Thank You for your tutorial! It is very usable.
Keep up the good work!

It actually work with little hassle..

February 13, 2002 by Myrna Adolph

I am pleasantly surprised that this formatting hint was no less free of the usual headaches but required very little adjusting. You my look at the results  after 5pm today at www.bookarcade.com and choose catalogues for the list of catalogues.

With appreciation,

Myrna

Alright

April 2, 2002 by Kutt Niinepuu
This all seems to work fine, as long as you know how. many records you have. But, say, in case of a photo album, where you dynamically add images to the DB this method can't be deployed. Or could someone suggest a workaround. Oh, I'm using CF. Otherwise, pretty ingenius. Good work!

You must me logged in to write a comment.