PowerTools SPREAD for Windows Forms 10.0J
TotalRowIndex プロパティ (TableView)


集計行のインデックスを取得します。
構文
'Declaration
 
Public ReadOnly Property TotalRowIndex As Integer
'使用法
 
Dim instance As TableView
Dim value As Integer
 
value = instance.TotalRowIndex
public int TotalRowIndex {get;}
次のサンプルコードは、集計行のインデックスを取得します。
fpSpread1.Sheets[0].Cells[1, 1].Text = "Last Name";
fpSpread1.Sheets[0].Cells[1, 2].Text = "Value";
fpSpread1.Sheets[0].Cells[2, 1].Text = "Smith";
fpSpread1.Sheets[0].Cells[2, 2].Value = 50;
fpSpread1.Sheets[0].Cells[3, 1].Text = "Vil";
fpSpread1.Sheets[0].Cells[3, 2].Value = 10;
fpSpread1.Sheets[0].Cells[4, 1].Text = "Press";
fpSpread1.Sheets[0].Cells[4, 2].Value = 78;
FarPoint.Win.Spread.TableView table = fpSpread1.Sheets[0].AddTable("table", 1, 1, 5, 2);
table.TotalRowVisible = true;
table.TableTotalRowStyleName = "Style1";
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
si.BackColor = Color.LightYellow;
si.ForeColor = Color.Gray;
table.TableTotalRowStyle = si;
listBox1.Items.Add(table.TotalRowIndex);
FpSpread1.Sheets(0).Cells(1, 1).Text = "Last Name"
FpSpread1.Sheets(0).Cells(1, 2).Text = "Value"
FpSpread1.Sheets(0).Cells(2, 1).Text = "Smith"
FpSpread1.Sheets(0).Cells(2, 2).Value = 50
FpSpread1.Sheets(0).Cells(3, 1).Text = "Vil"
FpSpread1.Sheets(0).Cells(3, 2).Value = 10
FpSpread1.Sheets(0).Cells(4, 1).Text = "Press"
FpSpread1.Sheets(0).Cells(4, 2).Value = 78
Dim table As FarPoint.Win.Spread.TableView = FpSpread1.Sheets(0).AddTable("table", 1, 1, 5, 2)
table.TotalRowVisible = True
table.TableTotalRowStyleName = "Style1"
Dim si As New FarPoint.Win.Spread.StyleInfo
si.BackColor = Color.LightYellow
si.ForeColor = Color.Gray
table.TableTotalRowStyle = si
ListBox1.Items.Add(table.TotalRowIndex)
参照

TableView クラス
TableView メンバ

 

 


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