asp.net.ph

HtmlTableRow.Height Property

System.Web.UI.HtmlControls Namespace   HtmlTableRow Class


Sets or retrieves the height of an HtmlTableRow control.

Syntax


Inline <tr height = intHeight | %Height ... >
Script HtmlTableRow.Height [ = intHeight | %Height ]

Property Value


intHeight Integer specifying the object height, in pixels.
%Height Value expressed as a percentage of the parent object's height.

The property is read/write with no default value.

Remarks

Use the Height property to control the displayed height of the HtmlTableRow control.

Setting the row height affects all cells in the row. While you can apply a Height value to a single cell, when specified, all cells in the row automatically share that same height.

By default, height is expressed in pixels, but can also be expressed as a percentage of the containing object, which is the HtmlTable. Heights expressed as percentages are based on the vertical space currently available, not on the natural size of the table. For example, if the browser window is resized, the table is resized accordingly.

Note, though, that this property always retrieves the height in pixels.

If you specify a height that is smaller than is required to display the contents of the HtmlTableRow, this property is ignored.

Example

The below code shows how to declaratively set the Height of an HtmlTableRow at design time.

<table cellspacing=1 width="92%" border=1 runat="server">
   <tr height=150>
      <td>Table data cell 1</td>
      <td>Table data cell 2</td>
   </tr>
</table>

The following example demonstrates how to programmatically set the Height of the first row of an HtmlTable at run time, based on a selected value.

myTable.Rows [ 0 ].Height = heightSelect.Value + "%";

 Show me 

See Also

HtmlTableRow Members   HtmlTableCell.Width   HtmlTableCell.NoWrap Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph