PowerTools SPREAD for Windows Forms 8.0J
MapperInfo コンストラクタ(Int32,Int32,Int32,Int32)


行インデックス
列インデックス
行数
列数
MapperInfoクラスの新しいインスタンスを初期化します。
構文
'Declaration
 
Public Function New( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
)
'使用法
 
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
 
Dim instance As New MapperInfo(row, column, rowCount, columnCount)
public MapperInfo( 
   int row,
   int column,
   int rowCount,
   int columnCount
)

パラメータ

row
行インデックス
column
列インデックス
rowCount
行数
columnCount
列数
次のサンプルコードは、範囲連結を使用します。
DataSet ds = new DataSet();
DataTable dt = default(DataTable);
dt = new DataTable();
dt.Columns.Add(new DataColumn("Number1", typeof(string)));
dt.Columns.Add(new DataColumn("Number2", typeof(string)));
dt.Columns.Add(new DataColumn("Number3", typeof(string)));
dt.Columns.Add(new DataColumn("Text1", typeof(string)));
dt.Columns.Add(new DataColumn("Text2", typeof(string)));
dt.Columns.Add(new DataColumn("Text3", typeof(string)));
dt.Columns.Add(new DataColumn("Text4", typeof(decimal)));
dt.Rows.Add(new object[] { "101", "1", "0", "Num1", "Num2", "Num3", 21000 });
dt.Rows.Add(new object[] { "201", "2", "0", "a", "b", "c", 9400 });
dt.Rows.Add(new object[] { "203", "2", "0", "Jan", "Feb", "March", 4550 });
dt.Rows.Add(new object[] { "301", "3", "1", "First", "Second", "Third", 32000 });
dt.Rows.Add(new object[] { "302", "3", "1", "Test", "Test1", "Test2", 13280 });
dt.Rows.Add(new object[] { "204", "2", "0", "Mon", "Tues", "Wed", 1700 });
dt.Rows.Add(new object[] { "303", "3", "1", "Week1", "Week2", "Week3", 36080 });
dt.Rows.Add(new object[] { "402", "4", "1", "d", "e", "f", 31500 });
dt.Rows.Add(new object[] { "405", "4", "1", "July", "August", "September", 4958 });
dt.Rows.Add(new object[] { "102", "1", "0", "next", "aaa", "max", 1539 });
ds.Tables.Add(dt);

FarPoint.Win.Spread.Data.SpreadDataBindingAdapter Sdba = new FarPoint.Win.Spread.Data.SpreadDataBindingAdapter();
Sdba.DataSource = ds.Tables[0];
Sdba.Spread = fpSpread1;
Sdba.SheetName = fpSpread1.ActiveSheet.SheetName;
Sdba.AutoGenerateRow = true;
Sdba.DataAutoCellTypes = false;  
Sdba.MapperInfo = new FarPoint.Win.Spread.Data.MapperInfo(2, 0, 10, 7);   
Sdba.FillSpreadDataByDataSource();
Dim ds As New DataSet()
Dim dt As DataTable = Nothing
dt = New DataTable()
dt.Columns.Add(New DataColumn("Number1", GetType(String)))
dt.Columns.Add(New DataColumn("Number2", GetType(String)))
dt.Columns.Add(New DataColumn("Number3", GetType(String)))
dt.Columns.Add(New DataColumn("Text1", GetType(String)))
dt.Columns.Add(New DataColumn("Text2", GetType(String)))
dt.Columns.Add(New DataColumn("Text3", GetType(String)))
dt.Columns.Add(New DataColumn("Text4", GetType(Decimal)))
dt.Rows.Add(New Object() {"101", "1", "0", "Num1", "Num2", "Num3", 21000})
dt.Rows.Add(New Object() {"201", "2", "0", "a", "b", "c", 9400})
dt.Rows.Add(New Object() {"203", "2", "0", "Jan", "Feb", "March", 4550})
dt.Rows.Add(New Object() {"301", "3", "1", "First", "Second", "Third", 32000})
dt.Rows.Add(New Object() {"302", "3", "1", "Test", "Test1", "Test2", 13280})
dt.Rows.Add(New Object() {"204", "2", "0", "Mon", "Tues", "Wed", 1700})
dt.Rows.Add(New Object() {"303", "3", "1", "Week1", "Week2", "Week3", 36080})
dt.Rows.Add(New Object() {"402", "4", "1", "d", "e", "f", 31500})
dt.Rows.Add(New Object() {"405", "4", "1", "July", "August", "September", 4958})
dt.Rows.Add(New Object() {"102", "1", "0", "next", "aaa", "max", 1539})
ds.Tables.Add(dt)

Dim Sdba As New FarPoint.Win.Spread.Data.SpreadDataBindingAdapter()
Sdba.DataSource = ds.Tables(0)
Sdba.Spread = FpSpread1
Sdba.SheetName = FpSpread1.ActiveSheet.SheetName
Sdba.AutoGenerateRow = True
Sdba.DataAutoCellTypes = False
Sdba.MapperInfo = New FarPoint.Win.Spread.Data.MapperInfo(2, 0, 10, 7)
Sdba.FillSpreadDataByDataSource()
参照

MapperInfo クラス
MapperInfo メンバ
オーバーロード一覧

 

 


© 2004-2015, GrapeCity inc. All rights reserved.