Accessing value of hidden table cell

C

chris

I've created an ASP table which is dynamically populated and it has a hidden
column at the end. The cell is marked as invisible but when I try and obtain
the cell value in client side script (JavaScript) then the cell does not
exist in the row's Cells collection. If I flag the cell as visible on
creation then the cell value can be accessed by the client side script.

Can someone help me out?
 
B

bruce barker

any control set to invisible is not rendered, so can not be accessed by
client script. you can set the style, but hidden fields seem like a better
idea.

-- bruce (sqlwork.com)
 
E

Eliyahu Goldin

For the reason Bruce's said, leave the column with Visible = true and hide
it with css rule display:none. You can do it by assignid the column's
CssClass="Invisible" where Invisible is defined somewhere in css as
..Invisible{displey:none}

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 

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