Dynamic Repeater Items

D

DalePres

I am working on an application what will have a set subset of a set
containing 8 link buttons on each repeater item. Each item will have one or
more buttons depending on the dataitem for that repeater item.

I know this should be simple but I can't find anything on how to dynamically
alter the Item and Alternating Item templates. I have created a working
solution using a custom control inherited from the Repeater and rendering my
own Items in the ItemDataBound event.

It just seems to me that there should be an easier and more direct method
for this. Can anyone point me in the right direction?

Thanks,

Dale
 
S

Scott G.

Implement an ITemplate class(es) and attach them to the ItemTemplate and AlternatingItemTemplate members of the repeater. Do a google for "asp.net repeater itemplate" and you should find some code examples.

Scott
I am working on an application what will have a set subset of a set
containing 8 link buttons on each repeater item. Each item will have one or
more buttons depending on the dataitem for that repeater item.

I know this should be simple but I can't find anything on how to dynamically
alter the Item and Alternating Item templates. I have created a working
solution using a custom control inherited from the Repeater and rendering my
own Items in the ItemDataBound event.

It just seems to me that there should be an easier and more direct method
for this. Can anyone point me in the right direction?

Thanks,

Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top