LoadTemplate logic in DataList

B

Barry

I have a three-level drilldown report. The top level is a DataList. When
an item is selected, a new DataList is instantiated in the SelectedItem
template. I'd like to have the same thing happen when going to the third
level, but there's a catch. Depending on what's selected on the second
level, the template for the third level will be different. I have played
with the LoadTemplate method but cannot figure out how to apply my
condition from the second-level selection. As I understand loadtemplate,
it needs to be called from the Page_Init function, but I want to base
the template selection on the second-level DataList's ItemCommand
command name. This is usually grabbed from the DataList's
CommandEventArgs.

Am I missing something about this?

Thanks in advance.
 
B

Barry

I should clarify that because the second level DataList is embedded
within the top-level's SelectedItemTemplate, it is late-bound, which
does not allow me to directly interact with it inside the Page_Init.
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top