To make rows invisible

Z

Zeba

Hi

I have a set of 10 rows. I want to display the row structure only when
it contains data. The setting of values is .done in my .aspx.cs
page(code-behind). I tried setting the attribute visible="false" for
my <tr> so that I can make the rows disappear altogether ( and set it
to visible="true" from the code whevever required) , but it doesn't
work. How do I do this ? The row should not be visible at all if there
is not data in it.

Thanks !
 
N

Neredbojias

Hi

I have a set of 10 rows. I want to display the row structure only when
it contains data. The setting of values is .done in my .aspx.cs
page(code-behind). I tried setting the attribute visible="false" for
my <tr> so that I can make the rows disappear altogether ( and set it
to visible="true" from the code whevever required) , but it doesn't
work. How do I do this ? The row should not be visible at all if there
is not data in it.

Thanks !

Your code-blurbs look dubious. However, without a url or real markup
example, it is impossible to determine.
 
B

Ben C

Hi

I have a set of 10 rows. I want to display the row structure only when
it contains data. The setting of values is .done in my .aspx.cs
page(code-behind). I tried setting the attribute visible="false" for
my <tr> so that I can make the rows disappear altogether ( and set it
to visible="true" from the code whevever required) , but it doesn't
work.

This is only the 21st century. You can't just tell computers what you
want them to do in plain English yet, but must carefully choose only the
specified command-words in the manual.
How do I do this ? The row should not be visible at all if there
is not data in it.

set style="display: none" on the rows instead, and display: table-row to
turn them back on again.
 
J

Jukka K. Korpela

Scripsit Ben C:
This is only the 21st century.

I keep forgetting that.
You can't just tell computers what you
want them to do in plain English yet, but must carefully choose only
the specified command-words in the manual.

That's very nasty of them computers. We should rebel against them.

They even force us to post URLs if we want to get help from fellow humans.
set style="display: none" on the rows instead, and display: table-row
to turn them back on again.

You can't put Humpty-Dumpty back again, since display: table-row won't work
on IE.

Too bad IE doesn't support visibility: collapse either.

Using display: block might work, though it would be illogical and risky,
when the element should really be a table row.

The main question here is whether it makes sense to hide rows in CSS when
the page is apparently dynamically generated anyway. So why can't the OP
just make the code omit the <tr> elements altogether (from the HTML
document) that contain no data?
 
?

=?windows-1252?Q?G=E9rard_Talbot?=

Jukka K. Korpela wrote :
Too bad IE doesn't support visibility: collapse either.

And too bad Opera 9.1 does not support visibility: collapse either.
Too bad the latest Safari 2.0.4 does not support visibility: collapse
either.
Too bad Konqueror 3.5 does not support visibility: collapse either.

Gérard
 
B

Ben C

Scripsit Ben C: [...]
set style="display: none" on the rows instead, and display: table-row
to turn them back on again.

You can't put Humpty-Dumpty back again, since display: table-row won't work
on IE.

Too bad IE doesn't support visibility: collapse either.

Using display: block might work, though it would be illogical and risky,
when the element should really be a table row.

That would result in this box structure:

table
block
table cells

Now I think the defined behaviour would be for the browser to generate
something like this tree of boxes (see CSS 2.1 17.2.1, not that that
necessarily bears much resemblance to with what IE would actually do):

table
anon table row
anon table cell
block
anon table
anon table row
table cells

This could cause a few unexpected problems-- for example if one or two
of the cells had rowspan >1.
 

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
474,141
Messages
2,570,817
Members
47,365
Latest member
BurtonMeec

Latest Threads

Top