private void Form1_Load(object sender, System.EventArgs e)
{
fpSpread1.ActiveSheet.RowCount = 6;
fpSpread1.ActiveSheet.AlternatingRows[1].BackColor = Color.LightCyan;
fpSpread1.ActiveSheet.DefaultStyle.CellType = new FarPoint.Win.Spread.CellType.NumberCellType();
fpSpread1.ActiveSheet.SetValue(0, 0, 10);
fpSpread1.ActiveSheet.SetValue(1, 0, 100);
fpSpread1.ActiveSheet.SetValue(2, 0, 100);
fpSpread1.ActiveSheet.SetValue(3, 0, 10);
fpSpread1.ActiveSheet.SetValue(4, 0, 5);
fpSpread1.ActiveSheet.SetValue(5, 0, 10);
fpSpread1.ActiveSheet.SetValue(0, 1, 10);
fpSpread1.ActiveSheet.SetValue(1, 1, 40);
fpSpread1.ActiveSheet.SetValue(2, 1, 10);
fpSpread1.ActiveSheet.SetValue(3, 1, 20);
fpSpread1.ActiveSheet.SetValue(4, 1, 10);
fpSpread1.ActiveSheet.SetValue(5, 1, 40);
}
private void button1_Click(object sender, System.EventArgs e)
{
//第1キー:1列目/第2キー:2列目としたSortInfoオブジェクトを作成します
FarPoint.Win.Spread.SortInfo[] si = new FarPoint.Win.Spread.SortInfo[2];
si[0] = new FarPoint.Win.Spread.SortInfo(0, true);
si[1] = new FarPoint.Win.Spread.SortInfo(1, true);
//作成済みソート条件を元に、全ての行/2列を対象としたソートを実行します
fpSpread1.ActiveSheet.SortRange(0, 0, fpSpread1.ActiveSheet.RowCount, 2, true, si);
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
FpSpread1.ActiveSheet.RowCount = 6
FpSpread1.ActiveSheet.AlternatingRows(1).BackColor = Color.LightCyan
FpSpread1.ActiveSheet.DefaultStyle.CellType = New FarPoint.Win.Spread.CellType.NumberCellType
FpSpread1.ActiveSheet.SetValue(0, 0, 10)
FpSpread1.ActiveSheet.SetValue(1, 0, 100)
FpSpread1.ActiveSheet.SetValue(2, 0, 100)
FpSpread1.ActiveSheet.SetValue(3, 0, 10)
FpSpread1.ActiveSheet.SetValue(4, 0, 5)
FpSpread1.ActiveSheet.SetValue(5, 0, 10)
FpSpread1.ActiveSheet.SetValue(0, 1, 10)
FpSpread1.ActiveSheet.SetValue(1, 1, 40)
FpSpread1.ActiveSheet.SetValue(2, 1, 10)
FpSpread1.ActiveSheet.SetValue(3, 1, 20)
FpSpread1.ActiveSheet.SetValue(4, 1, 10)
FpSpread1.ActiveSheet.SetValue(5, 1, 40)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'第1キー:1列目/第2キー:2列目としたSortInfoオブジェクトを作成します
Dim si(1) As FarPoint.Win.Spread.SortInfo
si(0) = New FarPoint.Win.Spread.SortInfo(0, True)
si(1) = New FarPoint.Win.Spread.SortInfo(1, True)
'作成済みソート条件を元に、全ての行/2列を対象としたソートを実行します
FpSpread1.ActiveSheet.SortRange(0, 0, FpSpread1.ActiveSheet.RowCount, 2, True, si)
End Sub