GridData.SetColumnValues operator

Introduced

v4.0

Description

Sets values for a single column of a GridData object.

C# Syntax

GridData.SetColumnValues( Object in_Column, Object in_1DArray );

Scripting Syntax

GridData.SetColumnValues( ColumnIndex, [NewValues] );

Parameters

Parameter Type Description
ColumnIndex long or string Index or label of the Column. The left-most column has index 0.
NewValues 1-Dimensional Array This size of this array should be equal to GridData.RowCount

Examples

VBScript Example

'Demo of SetColumnValues
'and GetColumnValues
dim oGridData
set oGridData = XSIFactory.CreateGridData
oGridData.ColumnCount = 4
oGridData.RowCount = 2
'Array size 2
dim aColVals( 1 )	
for i = 0 to oGridData.ColumnCount - 1
	aColVals(0) = i
	aColVals(1) = i + 10
	oGridData.SetColumnValues i, aColVals 
next
'Check the results
dim aRead
for i = 0 to oGridData.ColumnCount - 1
	aRead = oGridData.GetColumnValues( i )
	if ( aRead(0) <> i OR _
		aRead(1) <> ( i + 10 ) ) then
		LogMessage "Unexpected" 
	end if
next

See Also

GridData.SetRowValues GridData.GetColumnValues GridData.Data