asp.net.ph

TableCellCollection.Add Method

System.Web.UI.WebControls Namespace   TableCellCollection Class


Appends the specified table cell to the end of a TableRow.Cells collection.

[ VB ]
Public Sub Add ( _
   ByVal cell As TableCell _
) As Integer

[ C# ]
public int Add (
   TableCell cell
);

[ C++ ]
public: int Add (
   TableCell* cell
);

[ JScript ]
public function Add (
   cell : TableCell
) : int;

Parameters

cell
The TableCell to add to the collection.

Return Value

The index number of the TableCell.

Remarks

Use this method to add the specified TableCell to the end of a TableCellCollection. If you need to insert a TableCell at a specific location in the collection, use the AddAt method.

Example

The following example demonstrates how to use the Add method to programmatically append a new table cell to the end of a TableRow.Cells collection.

// instantiate a new cell
TableCell cell = new TableCell ( );
// add cell content
cell.Text = "This is a table cell";
// add the cell to the Cells collection
myRow.Cells.Add ( cell );
  C# VB

See Also

TableCellCollection Members   Cells.AddAt   Cells.Remove   Cells.RemoveAt 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