Spread for ASP.NET 8.0 Product Documentation
SetArray Method (IArraySupport)
Example 


Starting model row index
Starting model column index
Two-dimensional object array[row,column] containing tabular data
Sets an object array into a specified range of cells.
Syntax
'Declaration
 
Sub SetArray( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal value(,) As Object _
) 
'Usage
 
Dim instance As IArraySupport
Dim row As Integer
Dim column As Integer
Dim value() As Object
 
instance.SetArray(row, column, value)
void SetArray( 
   int row,
   int column,
   object[,] value
)

Parameters

row
Starting model row index
column
Starting model column index
value
Two-dimensional object array[row,column] containing tabular data
Example
This example sets an array into the model.
FarPoint.Web.Spread.Model.IArraySupport ias;
ias = (FarPoint.Web.Spread.Model.IArraySupport)FpSpread1.ActiveSheetView.DataModel;
object[,] x = {{6.0, 5.0, 11.0, 7.0, 5.0, 4.0, 4.0}};
ias.SetArray(0, 0, x);

object[,] arr;
arr = ias.GetArray(0, 0, 1, 7);
Response.Write("The last column in the array is " + arr.GetUpperBound(1).ToString());
Dim ias As FarPoint.Web.Spread.Model.IArraySupport
ias = FpSpread1.ActiveSheetView.DataModel
Dim x As Object(,) = {{2.0, 3.0, 9.0, 1.0, 8.0, 7.0, 5.0}}
ias.SetArray(0, 0, x)

Dim arr(,) As Object
arr = ias.GetArray(0, 0, 1, 7)
Response.Write("The last column in the array is " & arr.GetUpperBound(1).ToString())
Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

IArraySupport Interface
IArraySupport Members

 

 


Copyright © GrapeCity, inc. All rights reserved.