Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFTable.InitializeDataTable Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTable.InitializeDataTable Method
Helper method to initialize a DataTable to be used to set the Table property of the AFTable.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static bool InitializeDataTable(
	AFTable table,
	DataTable dataTable
)
Public Shared Function InitializeDataTable ( 
	table As AFTable,
	dataTable As DataTable
) As Boolean

Dim table As AFTable
Dim dataTable As DataTable
Dim returnValue As Boolean

returnValue = AFTable.InitializeDataTable(table, 
	dataTable)
public:
static bool InitializeDataTable(
	AFTable^ table, 
	DataTable^ dataTable
)
static member InitializeDataTable : 
        table : AFTable * 
        dataTable : DataTable -> bool 

Parameters

table
Type: OSIsoft.AF.AssetAFTable
The AFTable that the dataTable will be initialized to be used for setting its Table property.
dataTable
Type: System.DataDataTable
The DataTable that will be initialized to be used with the specified table.

Return Value

Type: Boolean
Returns if the dataTable was updated by calling this method. Otherwise, is returned.

Remarks

This helper can be used to initialize a DataTable that will be used to set the Table property. It will ensure that any DateTime columns of the DataTable have their DateTimeMode set correctly based upon the ConvertToLocalTime and TimeZone settings of the AFTable. This method should be called after the table's columns have been defined and before any rows have been added.

Important note Important
The Locale of the dataTable should normally be set to CurrentCulture.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in