Change Table size in

whiwex used Ask the Experts™
I am using and I have a page that contains a table with 20 rows and a drop down list. Each row in the table contains a label and a textbox. When the page loads all the labels and text boxes are invisible. When the user selects an item from the dropdownlist the some of the labels and text boxes are populated with text an those labels and textboxes are made visible. This all works fine. The problem is when the page is first loaded the full size of the table is displayed so 20 rows of nothing is displayed. If after making a selection from the drop down list and the first three rows have their labels and textbox filled with text the other 17 rows are still displayed as blank rows. Is it possible to just display the first three rows and have the other 17 rows hidden?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
When then drop down changes (and on load) you can use the Rows property of your table to access all TableRow ( in the table.

The TableRow has a property called Style which is a dictionary of text attributes added to the rows style tag. You can then use the "display" attribute, setting it to "none" to hide the row, and "" (blank) to show it.

Anytime the dropdown changes, you must update the Style of the TableRows that should now be hidden or shown.

You can have a look here for an example using javascript (not exactly what you need, but still pretty explicit):


Thanks used the table.rows.visible = false worked great

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial