TX Text Control .NET for Windows Forms Documentation

TableCellCollection Class

An instance of the TableCellCollection class contains all cells of a table in a Text Control document represented through TableCell objects. It can be obtained with the Table.Cells property. The TableCellCollection class implements the IEnumerable and the ICollection interfaces.

Syntax

[C#] public sealed class TableCellCollection: ICollection, IEnumerable
[Visual Basic] Public NotInheritable Class TableCellCollection Implements ICollection Implements IEnumerable

Properties

PropertyDescription
CanRemoveGets a value indicating whether table cells can be removed.
CountGets the number of cells contained in the table.

Methods

MethodDescription
CopyToCopies the elements of the collection to an array, starting at a particular index.
GetEnumeratorReturns an enumerator that can be used to iterate through the collection.
GetItemGets a particular table cell from the collection.
RemoveRemoves the table cell at the current text input position or all selected table cells when a text selection exists.

Example

The following example shows how to iterate over the table cell collection.

[C#] foreach (TXTextControl.TableCell myCell in myTable.Cells) { string myRow = myCell.Row.ToString(); string myCol = myCell.Column.ToString(); string myText = myCell.Text; Console.WriteLine("({0},{1}): {2}", myRow, myCol, myText); }
[Visual Basic] For Each MyCell As TXTextControl.TableCell In MyTable.Cells Dim MyRow As String = MyCell.Row.ToString() Dim MyCol As String = MyCell.Column.ToString() Dim MyText As String = MyCell.Text Console.WriteLine("({0},{1}): {2}", MyRow, MyCol, MyText) Next

See Also

 
 
 

Products

Support

Downloads

Corporate

Buy Now