Forums

This topic is locked

Row Numbering

Posted 25 Jul 2003 22:36:49
1
has voted
25 Jul 2003 22:36:49 Edgar Lagmay posted:
Would like to know how (and if an extension available) to do a dynamic row numbering---meaning, each record's row is numbered 1 to 10, for example, if there are 10 records displayed on the page.

Thanks in advance.

Replies

Replied 26 Jul 2003 00:19:50
26 Jul 2003 00:19:50 Phil Shevlin replied:
I don't know all the variables in MM's paging extension, But I messed around with and found that if you are using MM's repeat region and their navigation bar, this should work:

<pre id=code><font face=courier size=2 id=code> &lt;%=(rs_numRows + mm_offset - Repeat1__numRows + 1)%&gt;</font id=code></pre id=code>
Replied 26 Jul 2003 00:41:25
26 Jul 2003 00:41:25 Edgar Lagmay replied:
Thanks wdglide. But where exactly would this line go?

I'm not using the recordset navigation.
Replied 26 Jul 2003 13:57:43
26 Jul 2003 13:57:43 Phil Shevlin replied:
If your not using paging, then this should work:

&lt;%=(-Repeat1__numRows)%&gt;

It will write the row number. Put it wherever you want the row number to be.
Replied 26 Jul 2003 22:57:43
26 Jul 2003 22:57:43 Edgar Lagmay replied:
Thanks again, wdglide.

Tried the first code you gave and used a recordset navigation and it worked! Thank you very much, truly appreciate it.

The second code also worked if no paging is used.

I also found that the simple ordered list technique (as written in MM's technote index) does not work for paging because it repeats the same row numbering.

Reply to this topic