LoadTemplate logic in DataList

  • Thread starter Thread starter Barry
  • Start date Start date
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.
 
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.
 
Back
Top