473,499 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help on findcontrol() returns Nothing

2 New Member
Hi, I have two dropdownlist template columns in datagrid. Once the first one (Test Type, in column index 2, ID="ddlTestTypeID") selection changed, I need to re-bound the second dropdownlist (test standard, column index 3, ID="ddlTestStandardID"). So for the first dropdown control, I have: OnSelectedIndexChanged="OnDDLTypeModified"

Private Sub OnDDLTypeModified(ByVal sender As Object, ByVal e As System.EventArgs)

Dim ddl As DropDownList = sender
Dim myCache As New UtilityCacheManager() 'user defined class for datasource
Dim dgi As DataGridItem = ddl.NamingContainer
'rebuild datasource for teststand
Dim ddlStand As DropDownList
ddlStand = dgi.Cells(3).FindControl("ddlTestStandardID")
Dim dv As New DataView
dv = New DataView(myCache.RFTData.RFTTestStand) 'data source
dv.RowFilter = "TestType ='" & ddl.SelectedValue & "'"
ddlStand.DataSource = dv
ddlStand.DataBind()

End Sub

dgi.Cells(3).FindControl("ddlTestStandardID") returns 'Nothing'

What I did wrong here? Please help me!
Thanks and regards!

Jin
Nov 7 '06 #1
0 1039

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4120
by: MattB | last post by:
This is just a rephrased version of a question I posted earlier. I think I'm closer now, so it seemed worthy of a new (more specific) post. In my repeater I'm dynamically creating text boxes, so...
2
11170
by: MattB | last post by:
I've got some controls (mostly textboxes for now) that get created at runtime in a DataGrid. I create them using the OnItemDataBound event. I realize this isn't ideal, but I'm trying to see if I...
10
1877
by: Terry Olsen | last post by:
I've got a datagrid set up to display data. I've also got an Edit,Update,Cancel column set up to allow editing of data. I've got a DropDownList (ID="ddl3")in the EditItemTemplate for a certain...
5
2739
by: Siva | last post by:
Hello I have a dropdownlist inside the gridview as a template column defined as follows: <asp:TemplateField HeaderText="Choose Location"> <ItemTemplate> <asp:DropDownList ID="ddlChooseLoc"...
2
1691
by: John Smith | last post by:
I have this code: <asp:datagrid id="dg1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="SM"> <ItemTemplate> <asp:Label id="Label2" runat="server"...
1
1318
by: divingIn | last post by:
Hi, I have a master page and a content page. From my content page i can access the master page controls using Master.FindControl() but i cannot access controls from my content page using...
15
1302
by: Keith G Hicks | last post by:
I'm not sure what I'm doing wrong. Here's my code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim hyp As HyperLink =...
7
5684
by: AAaron123 | last post by:
Me.FindControl("MissionScheduleID"), below returns null. Do you know what I'm doing wrong? Thanks ***In my .aspx file I have: asp:Content ID="Content3"...
4
2967
by: Hillbilly | last post by:
Maybe this is or isn't some kind of bug but it sure is goofy and remains a mystery that really has me puzzled for two reasons... // goofy syntax functions as expected... Panel finalStepButton =...
0
7007
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
7174
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
7388
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
5470
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
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3099
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...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.