SalTableColumnCollection
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.50 (5.0.0.0)
Maintains the ordered SAL columns belonging to a table window.
- C#
- VB.NET
public class SalTableColumnCollection : IList, ICollection, IEnumerable, IList<SalTableColumn>, ICollection<SalTableColumn>, IEnumerable<SalTableColumn>
Public Class SalTableColumnCollection
Inherits IList
Implements ICollection, IEnumerable, IList(Of SalTableColumn), ICollection(Of SalTableColumn), IEnumerable(Of SalTableColumn)
Example:
SalTableColumn column = table.Columns["CustomerName"];
if (column != null)
{
int index = table.Columns.IndexOf("CustomerName");
}
Properties
Count
Int32: Gets the number of columns in this collection.
Item(index)
SalTableColumn: Gets a column at its collection index.
Replacing a column through this indexer throws NotSupportedException.
Item(name)
SalTableColumn: Gets a column by the name matched by IndexOf.
Returns null when no matching column exists.
TableWindow
SalTableWindowBase: Gets the table that owns this column collection.
Methods
Clear()
Disposes every column, deletes the table columns, and empties this collection.
Contains(column)
Checks whether a column instance is in the collection.
| Parameter | Type | Description |
|---|---|---|
| column | SalTableColumn | The column to find. |
Returns: Boolean. True when present; otherwise, false.
Contains(name)
Checks whether a column has the specified control name.
| Parameter | Type | Description |
|---|---|---|
| name | String | The case-sensitive name to find. |
Returns: Boolean. True when a matching name is present; otherwise, false.
CopyTo(array, index)
Copies the columns into an existing array.
| Parameter | Type | Description |
|---|---|---|
| array | Array | The destination array. |
| index | Int32 | The zero-based destination offset. |
GetEnumerator()
Enumerates columns in collection order.
Returns: IEnumerator. A non-generic enumerator over the backing column array.
IndexOf(column)
Finds the collection position of a column instance.
| Parameter | Type | Description |
|---|---|---|
| column | SalTableColumn | The column to find. |
Returns: Int32. The zero-based index, or -1 when absent.
IndexOf(name)
Finds the first column with an exact control name.
| Parameter | Type | Description |
|---|---|---|
| name | String | The case-sensitive name to find. |
Returns: Int32. The zero-based index, or -1 when absent.