473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

LoadTemplate logic in DataList


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.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #1
1 1703
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.

Barry <ba**********@nospam.com> wrote in message news:<#Y**************@TK2MSFTNGP09.phx.gbl>...
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.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fabrizio | last post by:
Hi, I'm trying to create a page with a datalist that loads from a template the ItemTemplate, which contains a linkbutton that should have the commandname = "edit" But when I click on the link...
0
by: Barry | last post by:
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...
0
by: Antonio Carpentieri | last post by:
Hi all, in a aspx page I have a repeater like this: <asp:repeater id=repeaterResults runat="server" OnItemCommand="RepeaterResult_Event"> <HeaderTemplate> <table width="515" border="0"...
4
by: Antonio Carpentieri | last post by:
Hi all, in my previous post I've wrong typed some tems.. this is the corrected post. in a aspx page I have a repeater like this: <asp:repeater id=repeaterResults runat="server"...
6
by: Paul | last post by:
I am trying to use a DataList and the ItemTemplate. I am binding the Datalist to a SQL query that gives me a list of Items with a Parent Category. I want to loop through all the items, but...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
0
by: rioka | last post by:
I'm going to display data with a repeater control, and each row can have a different layout depending on the value of a column: for example, if column A contains value "1" I want to display Column...
0
by: rm1234 | last post by:
Hi, When I try to use LoadTemplate with ExtractTemplateRows ="true" for Datalist I get the following ERROR -> A Table control was not found in the template for 'dDataList1' for an item of type...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.