The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



AssignAnotherDataMatrix


Unit:SDL_datatable
Class: TDataTable
Declaration: procedure AssignAnotherDataMatrix (NewDMat: TMatrix);

The method AssignAnotherDataMatrix allows an external matrix NewDMat to be assigned to the data table. Applying this method destroys the internal data matrix and assigns NewDMat instead of it. The dimensions of the other components of TDataTable (row and column names, cell states, row and column attributes) are adjusted accordingly. The measurement scale of all variables is reset to stInterval.

The contents of the matrix can be accessed by using the identifier NumericData. At the end of the operation the OnResize event is triggered.

Note 1: The OnChange and the OnSortExchange events of the matrix NewDMat are redirected to be used by TDataTable.

Note 2: An assigned external matrix is not destroyed if the data table is destroyed (in contrast to the original internal matrix, which is removed when an external matrix is assigned).

Example: This method is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): ntabedit



Last Update: 2012-Oct-20