asp.net.ph

HtmlTableRowCollection.Add Method

System.Web.UI.HtmlControls Namespace   HtmlTableRowCollection Class


Adds the specified table row object to the end of the Rows collection.

[ VB ]
Public Sub Add ( _
   ByVal row As HtmlTableRow _
) 

[ C# ]
public void Add (
   HtmlTableRow row
);

[ C++ ]
public: void Add (
   HtmlTableRow* row
);

[ JScript ]
public function Add (
   row : HtmlTableRow
);

Parameters

row
The table row object to add to the collection.

Remarks

Use this method to add the specified HtmlTableRow to the end of an HtmlTableRowCollection. If you need to insert an HtmlTableRow in a specified location in the collection, use the Insert method.

Example

The following example demonstrates how to use the Add method to append a new row to the end of the Rows collection.

// loop through the given number of rows
for ( int r = 0; r < numrows; r++ ) {
   // instantiate a new row
   HtmlTableRow row = new HtmlTableRow ( );

   // loop through the given number of cells
   for ( int c = 0; c < numcells; c++ ) {
      // ... code to add cells here ...
   }

   // add the row to the Rows collection
   myTable.Rows.Add ( row );
}

 Show me 

See Also

HtmlTableRowCollection Members 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