Click or drag to resize

imbDataTableExtensionsAddListToColumn Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Adds data from the list into new or existing column with specified columnName. Updates existing rows or creates new rows if required

Namespace:  imbSCI.DataComplex.extensions.data.formats
Assembly:  imbSCI.DataComplex (in imbSCI.DataComplex.dll) Version: 0.3.70.
Syntax
C#
public static int AddListToColumn(
	this DataTable table,
	IEnumerable list,
	string columnName = "",
	int skipRows = 0,
	string description = "",
	string letter = "",
	string displayName = ""
)
Request Example View Source

Parameters

table
Type: System.DataDataTable
The table.
list
Type: System.CollectionsIEnumerable
The list.
columnName (Optional)
Type: SystemString
Name of the column - it will automatically give name if not specified
skipRows (Optional)
Type: SystemInt32
Number of rows to skip before start with data insertation
description (Optional)
Type: SystemString
The description of the column
letter (Optional)
Type: SystemString
The letter or code associated with the column
displayName (Optional)
Type: SystemString
The display name for the column

Return Value

Type: Int32
Number of newly created rows

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataTable. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also