473,403 Members | 2,338 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,403 software developers and data experts.

Why did I lose my textbox reference?

jm
I have datagrid. Inside the template columms there is a textbox. It
has an id. When the textbox wasn't inside the datagrid tags, I could
reference with order_id.text = "some text" but all of a sudden, once
inside the datagrid tags, I can't use the same statement

Any ideas on what is going on here? Thanks.
Nov 18 '05 #1
2 1195
Use the FindControl() Method of the DataGrid. The FindControl() Method of a
Control looks for the Control with the ID property you specify in the string
you pass to it, and returns a reference to that Control.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
I have datagrid. Inside the template columms there is a textbox. It
has an id. When the textbox wasn't inside the datagrid tags, I could
reference with order_id.text = "some text" but all of a sudden, once
inside the datagrid tags, I can't use the same statement

Any ideas on what is going on here? Thanks.

Nov 18 '05 #2
jm
Thanks. Curious. Do you use two panels on a form when creating rows
and then reviewing them? Just wondered if you use one of the forms
for entering data, etc. and then when viewing, a separate datalist or
datagrid populated (then edit, update, delete buttons), or do you have
the creation form doubling as the viewing form instead of two separate
panels within the form?

"Kevin Spencer" <ke***@takempis.com> wrote in message news:<#6**************@TK2MSFTNGP12.phx.gbl>...
Use the FindControl() Method of the DataGrid. The FindControl() Method of a
Control looks for the Control with the ID property you specify in the string
you pass to it, and returns a reference to that Control.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
I have datagrid. Inside the template columms there is a textbox. It
has an id. When the textbox wasn't inside the datagrid tags, I could
reference with order_id.text = "some text" but all of a sudden, once
inside the datagrid tags, I can't use the same statement

Any ideas on what is going on here? Thanks.

Nov 18 '05 #3

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

Similar topics

0
by: Andrea Trevisan | last post by:
That's a revival of a known thing I suppose.I hope it's useful. My problem was: I want to have a DataGrid with two Template columns: first with TextBox,second with Button.I want to fire an event...
3
by: Omar Llanos | last post by:
I have Form1 and Form2 (which is inherited from Form1), and I created a button in Form2 that will fill up a textbox in Form1. What code would do that? I tried the simplest way: //from child...
2
by: chris | last post by:
Does anybody know how I can programmatically cause a textbox to lose focus and automatically jump to the next appropriate control. I have a custom textbox usercontrol whereby the requirement is...
1
by: Fraggle | last post by:
I have a repeater with controls added at run time. the <template> also contains a <asp:textbox that is made visible on some repeater elements. when I come to read the text info out it has...
3
by: John Mason | last post by:
Hi, I am trying to work out how to make reference to an asp textbox control within a class, contained in a user control, but receive the following error... BC30469: Reference to a non-shared...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
4
by: Tom McLaughlin | last post by:
I have been working on projects in vb5 and I am now trying to get started with .net as you can see I am not doing very well. I have a program that has two forms. On form1 I have a TextBox1. From...
4
by: OpticTygre | last post by:
If I create a checkbox dynamically: Dim NewCheckBox as New Checkbox Then, I display that checkbox on a form, how can I cause the checkbox to lose focus after a user clicks on it? TIA, ...
1
by: danyeungw | last post by:
I get the following from the link http://support.microsoft.com/kb/314206. I need to have both work - the page stays where it is and set focus to next control. Does anyone have solution? I have...
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: 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...
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
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...
0
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...
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,...

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.