DataTableGetRows Method (DataValueCursor)

Spotfire 14.2 API Reference
Enumerates all rows for the columns specified by the given valueCursors.

Namespace:  Spotfire.Dxp.Data
Assembly:  Spotfire.Dxp.Data (in Spotfire.Dxp.Data.dll) Version: 64.0.19329.3263 (64.0.19329.3263)
Syntax

C#
public IEnumerable<DataRow> GetRows(
	params DataValueCursor[] valueCursors
)

Parameters

valueCursors
Type: Spotfire.Dxp.DataDataValueCursor
Specifies what columns to include in the enumeration and are used to access the individual data values for each row.

Return Value

Type: IEnumerableDataRow
An enumeration of all rows.
Examples

DataTable table;
DataValueCursor<int> cursor1 = DataValueCursor.Create<int>(table.Columns["Column1"]);
DataValueCursor<double> cursor2 = DataValueCursor.CreateNumeric(table.Columns["Column2"]);
DataValueCursor<string> cursor3 = DataValueCursor.CreateFormatted(table.Columns["Column3"]);

foreach (DataRow row in table.GetRows(cursor1, cursor2, cursor3)) 
{
  int rowIndex = row.Index;
  int value1 = cursor1.CurrentValue;
  double value2 = cursor2.CurrentValue;
  string value3 = cursor3.CurrentValue;
  DoSomething(rowIndex, value1, value2, value3);
}
Version Information

Supported in: 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8, 11.7, 11.6, 11.5, 11.4
See Also

Reference