D
darrel
I'm trying to whip up a fancy repeater control that will put records into a
two-column table for me.
This is how I envision it working:
itemtemplate
if record count = odd then write out the TR tag
td <record> /td
if record count = even then wrote out the /TR tag
if record count = odd AND it's the last record, write out an empty TD and
/TR tag
/itemtempalte
That logic isn't perfect ,but hopefully that got the point across.
The first record, being odd, opend the TR and writes out a TD. The second
record, being even, writes out a TD, and then then closed the TR. Etc.
I then need to check the last record. If it is odd, it needs to pad one
extra TD before closing the TR so the table is valid.
So...the question! Can you grab the record count from within the UserControl
itself?
-Darrel
two-column table for me.
This is how I envision it working:
itemtemplate
if record count = odd then write out the TR tag
td <record> /td
if record count = even then wrote out the /TR tag
if record count = odd AND it's the last record, write out an empty TD and
/TR tag
/itemtempalte
That logic isn't perfect ,but hopefully that got the point across.
The first record, being odd, opend the TR and writes out a TD. The second
record, being even, writes out a TD, and then then closed the TR. Etc.
I then need to check the last record. If it is odd, it needs to pad one
extra TD before closing the TR so the table is valid.
So...the question! Can you grab the record count from within the UserControl
itself?
-Darrel