SalTableRowCollection
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.50 (5.0.0.0)
Provides a SAL row-wrapper view over an existing grid row collection.
- C#
- VB.NET
public class SalTableRowCollection : IList, ICollection, IEnumerable, IEnumerable<SalTableRow>
Public Class SalTableRowCollection
Inherits IList
Implements ICollection, IEnumerable, IEnumerable(Of SalTableRow)
The collection reflects the grid; it does not create a detached copy of its rows.
Example:
var rows = new SalTableRowCollection(grid);
foreach (SalTableRow row in rows)
{
row.SetFlags(Sys.ROW_Selected, false);
}
Constructors
SalTableRowCollection(grid)
Wraps the row collection of an existing grid.
| Name | Type | Description |
|---|---|---|
| grid | DataGridView | The non-null grid whose Rows collection is exposed. |
Properties
Count
Int32: Gets the current number of underlying grid rows.
Item(index)
SalTableRow: Gets the SAL wrapper associated with a grid row.
Uses SalTableRow.FromGridRow to resolve the wrapper.
Methods
Contains(row)
Checks whether a row belongs to the underlying grid row collection.
| Parameter | Type | Description |
|---|---|---|
| row | SalTableRow | The non-null row to find. |
Returns: Boolean. True when its grid row is present; otherwise, false.
CopyTo(array, index)
Copies rows starting at the specified source index into the same indices of an array.
| Parameter | Type | Description |
|---|---|---|
| array | Array | The destination array, large enough to hold entries through Count minus one. |
| index | Int32 | The first source and destination index to copy. |
This implementation skips preceding source rows instead of offsetting a copy of the entire collection.
IndexOf(row)
Finds the data-row index of a SAL row wrapper.
| Parameter | Type | Description |
|---|---|---|
| row | SalTableRow | The row to find. |
Returns: Int32. The zero-based index, or -1 when absent.