determining datasource item count within ITemplate

A

Alex

I'm working with a repeater control that contains dynamically created
custom composite controls. Within the ITemplate.InstantiateIn() method
I need access to the repeater's datasource's item count.

Does the framework allow access to that data -- short of writing that
number in a session variable or the like...
 
G

gsnke

I would assume that you created your own implementation of ITemplate?
If you include an itemCount property in there you can write to that
property at the time when you call the databind. Voila, you have the
data you want by the time the items get created in the InstantiateIn()
method.

Gero
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top