Spread Windows Forms 8.0 Product Documentation
SetArray Method (DefaultSheetDataModel)
Example 


Sets an object array into a specified range of cells.
Overload List
OverloadDescription
SetArray(Int32,Int32,Object[,])Sets an object array into a specified range of cells.  
SetArray(Int32,Int32,Object[,],Boolean)Sets an object array into a specified range of cells.  
SetArray(Int32,Int32,Object[,],Boolean,ReferenceStyle)Sets an object array into a specified range of cells.  
Example
This example sets an object array into a range of cells.
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 10)
FpSpread1.ActiveSheet.Models.Data = dataModel
Dim arr(5, 10) As Object
Dim o As Object
Dim i, j As Integer
For i = 0 To 4
For j = 0 To 9
arr(i, j) = i + j
Next j
Next i
dataModel.SetArray(1, 0, arr)
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 10);
fpSpread1.ActiveSheet.Models.Data = dataModel;
int i, j;
object[,] arr;
arr = new object[5,10];
for(i = 0; i <= 4; i++)
{
for(j = 0; j <= 9; j++)
arr[i,j] = i + j;
}
dataModel.SetArray(1, 0, arr);
}
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members

 

 


Copyright © GrapeCity, inc. All rights reserved.