v4.0
Returns a 1-Dimensional Array containing all the elements in the requested row.
oArray = GridData.GetRowValues( RowIndex ); |
1-Dimensional Array
Parameter | Type | Description |
---|---|---|
RowIndex | long or string | Index or label of the Row. The top row has index 0. |
//Demo of SetRowValues //and GetRowValues var oGridData = XSIFactory.CreateGridData() ; oGridData.ColumnCount = 2; oGridData.RowCount = 10; var aColVals = new Array( 2 ) ; for( i = 0 ; i < oGridData.RowCount ; i++ ) { aColVals[0] = i ; aColVals[1] = i + 10 ; oGridData.SetRowValues( i, aColVals ) ; } //Check the results for( i = 0 ; i < oGridData.RowCount ; i++ ) { // Return value is a SAFEARRAY so we need to convert // to JScript Array to read the values var aSafeArray = oGridData.GetRowValues( i ) ; var aRead = new VBArray( aSafeArray ).toArray() ; if ( aRead[0] != i || aRead[1] != ( i + 10 ) ) { LogMessage( "Unexpected" ) ; } } |