Skip to main content
Version: 2025

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.

public class SalTableRowCollection : IList, ICollection, IEnumerable, IEnumerable<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

Instance member SalTableRowCollection(grid)

Wraps the row collection of an existing grid.

NameTypeDescription
gridDataGridViewThe non-null grid whose Rows collection is exposed.

Properties

Instance member Count

Int32: Gets the current number of underlying grid rows.

Instance member Item(index)

SalTableRow: Gets the SAL wrapper associated with a grid row.

Uses SalTableRow.FromGridRow to resolve the wrapper.

Methods

Instance member Contains(row)

Checks whether a row belongs to the underlying grid row collection.

ParameterTypeDescription
rowSalTableRowThe non-null row to find.

Returns: Boolean. True when its grid row is present; otherwise, false.

Instance member CopyTo(array, index)

Copies rows starting at the specified source index into the same indices of an array.

ParameterTypeDescription
arrayArrayThe destination array, large enough to hold entries through Count minus one.
indexInt32The first source and destination index to copy.

This implementation skips preceding source rows instead of offsetting a copy of the entire collection.

Instance member IndexOf(row)

Finds the data-row index of a SAL row wrapper.

ParameterTypeDescription
rowSalTableRowThe row to find.

Returns: Int32. The zero-based index, or -1 when absent.