473,779 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
CommandEventArg s.

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 1720
I should clarify that because the second level DataList is embedded
within the top-level's SelectedItemTem plate, it is late-bound, which
does not allow me to directly interact with it inside the Page_Init.

Barry <ba**********@n ospam.com> wrote in message news:<#Y******* *******@TK2MSFT NGP09.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
CommandEventArg s.

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
4001
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 button nothing happens. I tried also the findcontrol method, without any result. That's the template: <asp:LinkButton ID="button1" Runat="server" Text=''
0
978
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 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...
0
1019
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" cellpadding="3" cellspacing="0"> </HeaderTemplate> <FooterTemplate> </table> </FooterTemplate>
4
1953
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" OnItemCommand="RepeaterResult_Event"> <HeaderTemplate> <table width="515" border="0" cellpadding="3" cellspacing="0"> </HeaderTemplate> <FooterTemplate>
6
9595
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 only print the Parent Category once, regardless of how many child items are in it. So my perfect output would look something like:
3
10303
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 (where is the child DataList).... But in case I want to make Edit in this child DataList it is not working... No edit template showed... :( this is a code that i use for the child DataList... Edit command // this is for child DataList...
0
1329
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 B; but if column A contains value "2", I'm going to display column C and D. (real situation is a bit more complicated, of course). I've been searching around in the past few days trying to get experiences from others having similar problems,...
0
905
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 'ListItemType.Header' When I directly place the code in the "template files" under the Datalist the property works fine! But due to project requirement I need to place a control into the item and header templates of datalist.
3
2811
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 need to control the visibility of a textbox based on a dropdown selection in the datalist's edititem template. To do this, I registered a client script block function and attached a client side handler for the dropdownlist's onchange event in the...
0
9636
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9930
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.