Lost Controls

G

Guest

hey all,
in vb code behind the code goes like this in the RowDataBound event of a
gridView:
e.Rows.Cells(0).FindControl("myTextBoxID")

however, I can't seem to find the control in my C# code-behind? Is there an
extra cast or something I'm missing?

thanks,
rodchar
 
K

Konstantinos Pantos

Its seems to me that you're missing the row number.
Have you tried e.Rows(n).Cells(0).FindControl("myTextBoxID") (where n is the
row number you want to search)?

--
HTH
____________________
Konstantinos Pantos
MCP Software Engineer
http://kostas.pantos.name
 
G

Guest

Here's how I found it and also I might have been on the wrong RowType to find
it, I'm not sure yet.
(DropDownList)e.Row.Cells[2].FindControl("myTextBox")
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top