CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 how do i hide columns in a table

Print topic Send  topic

Author Message
zaratul
Posted: 05/16/2008, 2:19 AM

Hi All

I hope somebody can help me. I need a way to hide columns in a table
dynamicaly. The user must click on checkboxes that will determine which
colums must be displayed

If anybody knows how to do this please help
Regards and thanks in advance

TheunisP

Posts: 342
Posted: 05/16/2008, 2:42 AM

z, ok to do this you have to keep in mind how tables work e.g. their is columns in rows ok - so while it is easy to hide a row, columns on the other hand is spanning rows so you can't just encapsulate it and be done - but here is my suggestion

put you hidable columsn into panels - you can then switch of the panel e.g.

<!--panel start>
<td>
warra warra
</td>
<!--panel end>

remember to do this for the heading as well

now the catch is handle the colspan in the nav td at the bottom - you will have to keep track of how many columns you are actually displaying and adapt the colspan value

I suggest start at the top of you event file

dimension the variable e.g. intNumberOfColumns
intNumberOfColumns=5 ' the default number of columns

you must then deduct the the number of deactivated from that

so that your last rows will display correctly
View profile  Send private message
TheunisP

Posts: 342
Posted: 05/16/2008, 2:50 AM

stop! ignore my previous post - you'll need some javascript for this e.g. wrap each and evry columns entry in a DIV then by incrrementing ID do a getelement and set each entries style to None and then reverse it with Inline/Block



View profile  Send private message
TheunisP

Posts: 342
Posted: 05/16/2008, 2:54 AM

these guys seem to have a nice solution, with a slightly different approach:

http://www.adp-gmbh.ch/web/js/hiding_column.html
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.