GridServices.GridToValues Method

Overload List

#SignatureDescription
1TMtx GridToValues(DataGridView grid, TMtx dst, Boolean iscomplex, Boolean headers)Copy DataGrid cells to Matrix.
2TMtx GridToValues(DataGridView grid, TMtx dst, Int32 gridrow, Int32 gridcol, Int32 Row, Int32 Col, Int32 RowCount, Int32 ColCount, Boolean iscomplex)Copy grid subarray to matrix.
3TVec GridToValues(DataGridView grid, TVec dst, Boolean iscomplex, Boolean vertical, Boolean headers)Copies DataGrid elements to vector.
4TVec GridToValues(DataGridView grid, TVec dst, Int32 gridrow, Int32 gridcol, Int32 index, Int32 len, Boolean iscomplex, Boolean vertical)Copy DataGrid cells to Vector.

Overload 1: TMtx GridToValues(DataGridView grid, TMtx dst, Boolean iscomplex, Boolean headers)

Copy DataGrid cells to Matrix.

#NameDescription
1gridSource DataGrid
2dstDestination Matrix
3iscomplexTreat cell values as complex numbers.
4headersDataGrid has row and column headers.

Result: stored in self (calling object), returns self for chaining

Returns: Matrix with values from grid.

Overload 2: TMtx GridToValues(DataGridView grid, TMtx dst, Int32 gridrow, Int32 gridcol, Int32 Row, Int32 Col, Int32 RowCount, Int32 ColCount, Boolean iscomplex)

Copy grid subarray to matrix.

#NameDescription
1gridSource grid.
2dstDestination matrix.
3gridrowSubarray starting row index.
4gridcolSubarray starting column index.
5RowDestination matrix starting row index.
6ColDestination matrix starting column index.
7RowCountNumber of rows to copy from grid.
8ColCountNumber of columns to copy from grid.
9iscomplexIf true, two consecutive columns in grid will be treated as single complex number. If false, cells will be treated as real separate values.

Result: stored in self (calling object), returns self for chaining

Returns: Destination matrix with values from grid.

Remarks:

Copies datagrid elements, starting with [gridrow,gridcol] and ending with

[gridrow + RowCount,gridcol + ColCount] to destination matrix submatrix, starting at
[Row,Col] and ending with [Row+RowCount,Col+ColCount].

Overload 3: TVec GridToValues(DataGridView grid, TVec dst, Boolean iscomplex, Boolean vertical, Boolean headers)

Copies DataGrid elements to vector.

#NameDescription
1gridSource DataGrid
2dstDestination vector holding values.
3iscomplexIf true, two consecutive columns in grid will be treated as single complex number. If false, cells will be treated as real separate values.
4verticalIf true, each column will be treated as separate number.
5headersIf false, he acquisition starts at first cell [0,0]. If true, the first column and first row are ignored and submatrix starts at [1,1].

Result: stored in self (calling object), returns self for chaining

Returns: Vector with values from grid.

See Also: GridServices.ValuesToGrid

Overload 4: TVec GridToValues(DataGridView grid, TVec dst, Int32 gridrow, Int32 gridcol, Int32 index, Int32 len, Boolean iscomplex, Boolean vertical)

Copy DataGrid cells to Vector.

#NameDescription
1gridSource DataGrid.
2dstDestination Vector.
3gridrowDataGrid start row index.
4gridcolDataGrid start column index.
5indexVector start index.
6lenVector subarray length.
7iscomplexTreat cell values as complex numbers.
8verticalIf true, vector is represented as single DataGrid column. If false, vector is represented as single DataGrid row.

Result: stored in self (calling object), returns self for chaining