DataGridColumnAdder Constructor CleanCode C# Libraries v1.2.03 API
Initializes a new instance of the DataGridColumnAdder class.

Namespace: CleanCode.Forms
Assembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax

public DataGridColumnAdder(
	DataTable sourceTable,
	DataGridView targetTable,
	string idColumnName
)

Parameters

sourceTable
Type: OnlineSystem.Data DataTable
Table from which to copy column names and values.
targetTable
Type: OnlineSystem.Windows.Forms DataGridView
Table to add columns to.
idColumnName
Type: OnlineSystem String
Key column in the sourceTable and targetTable to match rows between them.
Exceptions

ExceptionCondition
OnlineSystem FormatExceptionif idColumnName is not present in the targetTable.
Remarks

All columns in the sourceTable will be added (as empty columns) to the targetTable during initialization, except for the key column idColumnName which must already be present.
See Also