Formating a Table that's nested in a FormView

D

Dave

I have a table that's located in the ItemTemplate and EditTemplate.
Each table has the same name. I'm trying to format the BgColor of a
specific color on PreRender. I know how to access the colomn
properties if it were on the page, but once it goes in to a formview I
can't seem to find it.

How can I access a table that's nested in a FormView?
 
A

Andy O'Neill

Dave said:
I have a table that's located in the ItemTemplate and EditTemplate.
Each table has the same name. I'm trying to format the BgColor of a
specific color on PreRender. I know how to access the colomn
properties if it were on the page, but once it goes in to a formview I
can't seem to find it.

How can I access a table that's nested in a FormView?

Pre .net 4 you have to do a findcontrol to get the real id.
With .Net 4 you can tell what it's going to be.
Well.
Actually with .net 2 onwards you can tell what it's going to be by just
looking at the html but that's kind of dodgy.
 
D

Dave

Thanks for your reply Andy! If you would, please explain how to use
FindControl on an HTML table. I've set the (Id) to defaultTable and
RunAt to server. No luck using FindControl. The Code I'm using is
below, but it still doesn't see it:

Table t =
((Table)CornerstoneBrickViewFormView.FindControl("defaultTable")));


Am I doing something wrong?
 

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

Top