Why did I lose my textbox reference?

J

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.
 
K

Kevin Spencer

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.
 
J

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top