v4.0
Sets values for a single column of a GridData object.
GridData.SetColumnValues( ColumnIndex, [NewValues] ); |
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 |
'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 |