Why did I lose my textbox reference?

  • Thread starter Thread starter jm
  • Start date Start date
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.
 
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.
 
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?
 
Back
Top