Formating a Table that's nested in a FormView

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