EditCommandsMapOrCreatePropertyColumns Method |
Maps each property column of the source table to a corresponding property columns of the destination table. If no matching property
column can be found in the destination table, a new matching property column is added to the destination table.
Namespace: Altaxo.Worksheet.CommandsAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax protected static DataColumn[] MapOrCreatePropertyColumns(
DataTable desttable,
DataTable sourcetable
)
Parameters
- desttable DataTable
- The destination table.
- sourcetable DataTable
- The source table.
Return Value
DataColumnAn array of columns. Each column of the array is a property column in the destination table, which
matches the property column in the source table by index.
Remarks
1.) Since the returned columns are part of the PropCols collection of the destination table, you must not
use these for inserting i.e. in other tables.
2.) The match is based on the names _and_ the types of the property columns. If there is no match,
a new property column of the same type as in the source table and with a reasonable name is created.
Therefore each mapped property column has the same type as its counterpart in the source table.
See Also