473,665 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datalist changes impacting other controls in list

I have a datalist which has an edititem template.
When the user is in edit mode (of the datalist) it shows a couple of text
boxes for editing as well as a drop down list box and has a label control.
When the user changes the item in the drop down list I would like to set the
labels text property to a different description.
My problem is I have the event that can be triggered when the Drop down
selected index changes but can't seem to get a reference to the data list
label control for that particular item being edited.
Here is an example of something of I have:

Within the edit item template of the data grid exists something like this :
<TR>
<TD>
<asp:label id="Label11" runat="server" Font-Underline="True " Width="104px"
Height="15px" Font-Size="X-Small">Chosen Title:</asp:label><BR>
<asp:dropdownli st id=ddlChosenTit le runat="server" Width="228px"
Height="25px" OnSelectedIndex Changed="dl_Sel ectedIndexChang ed"
AutoPostBack="T rue" DataValueField= "Title_ID" DataTextfield=" Title"
Datasource="<%# GetTitles() %>"></asp:dropdownlis t>
</TD>
<TD>
<asp:label id="lblProfDesc r" runat="server" Font-Size="X-Small"></asp:label>
</TD>
</TR>

In the vb code behind is this event which fires when the ddl is changed:
I am having trouble using the find control method or other way to get a
reference the the lblProfDescr so I can set the text property

Public Sub dl_SelectedInde xChanged(ByVal Sender As Object, ByVal e As
System.EventArg s)
Dim lblDescr As Label
Try
Dim dl As DropDownList = CType(Sender, DropDownList) ' this
would get a reference to the DDL
'This is where I would like to get the reference to the specific label and
set/change its text property

Catch eMsg As Exception
'send message
End Try
End Sub

Nov 19 '05 #1
0 888

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

Similar topics

2
3044
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.. only the labels (caption) and the invisible literal controls are binded.. Now based on the invisible literal control values I get the information from DB to bind it with each dropdown list (I am doing this in the item databound event) Also based on...
8
2829
by: Nevyn Twyll | last post by:
I have a multi-level datalist setup: DataList1 DataList2 MyGrid I have columns explicitly defined for the grid in the html. Sometimes, On the initial Load() of the Page, I want to add extra columns to the datagrid - for all records. I tried getting a reference to the datagrid like this:
6
2184
by: tshad | last post by:
I need to get to a status label I have on my footer section of my datalist. There is no event happening that would go to the footer. I am just doing some processing and want to update the label on the footer. At the moment, I go through the dataListItems like so: for each oItem as DataListItem in DataList1.Items trace.warn("inside for loop oItem type = " & oItem.itemType.ToString())
4
8754
by: bwalke | last post by:
I am developing a web form which is going to be used for manufacturing input. The form uses a DataList which list a batch of parts that may range anywhere from 1-9 parts. The DataList contains 6 textboxes pre-fill with data (reason for using datalist) which will capture user input and changes to the textboxes. So the 6 textboxes in columns will be constant but the rows will vary representing each part. I am looking to loop through...
0
3937
by: Isz | last post by:
PROBLEM: This problem is related to the postback and handling events correctly. BACKGROUND: I have a datalist which acts as a tabbes list with horizontal layout. This datalist is bound to a strogly typed collection I called TabCollection which is a collevtion of items called tab. Each tab is as follows:
3
10292
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...
4
2796
by: Nathan Sokalski | last post by:
I have a DataList that has an Button as one of the controls in it's ItemTemplate. The Button has a CommandName="delete" attribute, but when I click it the DeleteCommand event doesn't even get fired. I have checked everything I could think of, but everything looks correct to me. Here is the relevant code from the *.aspx file and the *.aspx.vb files (if I missed something that is relevant, let me know): ASPX File:
2
3119
by: cmay | last post by:
I am binding a List(Of T) to a DataList. In this case, T is a class Test, which has a property TestId. I am trying to use the DataKeyField with this <asp:DataList DataKeyField="TestId" ... The datalist displays fine, but when I do a post back, the DataKeys collection is empty.
1
1220
by: rn5a | last post by:
An ASP.NET Form has different server controls like Panels, Labels, TextBoxes, HiddenFields etc. The Form has a DataList as well. This is how the DataList looks: <form runat="server"> <asp:DataList ID="dlUsers" runat="server"> <HeaderTemplate> <table border=2> <tr> <th>First Name</th>
0
8438
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
8348
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
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
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
8636
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
7376
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...
1
6187
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.