asp.net.ph

TableRowCollection.AddAt Method

System.Web.UI.WebControls Namespace   TableRowCollection Class


Inserts a row at the specified index in a Table.

[ VB ]
Public Sub AddAt ( _
   ByVal index As Integer, _
   ByVal row As TableRow _
)

[ C# ]
public void AddAt (
   int index,
   TableRow row
);

[ C++ ]
public: void AddAt (
   int index,
   TableRow* row
);

[ JScript ]
public function AddAt (
   index : int,
   row : TableRow
);

Parameters

index
The location in the collection in which to add the TableRow.
row
The TableRow to insert into the location.

Remarks

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

Example

The following example shows use of the AddAt method to programmatically insert a row at the specified index location in a Table control at run time.

// instantiate a new row
TableRow row = new TableRow ( );
// add the row to the Rows collection
myTable.Rows.AddAt ( 0, row );
  C# VB

See Also

TableRowCollection Members   Rows.Add   Rows.AddRange   Rows.Remove   Rows.RemoveAt   Rows.Clear 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