asp.net.ph

TableCellCollection.AddAt Method

System.Web.UI.WebControls Namespace   TableCellCollection Class


Inserts a table cell at the specified index in a TableRow.Cells collection.

[ VB ]
Public Sub AddAt ( _
   ByVal index As Integer, _
   ByVal cell As TableCell _
)

[ C# ]
public void AddAt (
   int index,
   TableCell cell
);

[ C++ ]
public: void AddAt (
   int index,
   TableCell* cell
);

[ JScript ]
public function AddAt (
   index : int,
   cell : TableCell
);

Parameters

index
The location in the collection in which to add the TableCell.
cell
The TableCell to insert into the location.

Remarks

Use this method to insert a TableCell object at the specified index location in a TableCellCollection. If you need to append a TableCell to the end of the collection, use the Add method.

Example

The following example demonstrates how to use the AddAt method to programmatically insert a TableCell at the specified index location in 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.AddAt ( 0, cell );
  C# VB

See Also

TableCellCollection Members   Cells.Add   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