473,387 Members | 1,540 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,387 software developers and data experts.

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:dropdownlist id=ddlChosenTitle runat="server" Width="228px"
Height="25px" OnSelectedIndexChanged="dl_SelectedIndexChanged"
AutoPostBack="True" DataValueField="Title_ID" DataTextfield="Title"
Datasource="<%# GetTitles() %>"></asp:dropdownlist>
</TD>
<TD>
<asp:label id="lblProfDescr" 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_SelectedIndexChanged(ByVal Sender As Object, ByVal e As
System.EventArgs)
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 875

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

Similar topics

2
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.....
8
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...
6
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...
4
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 ...
0
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...
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...
4
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...
2
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" ... ...
1
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">...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.