private void Form1_Load(object sender, System.EventArgs e)
{
// データセットを作成します
DataTable dt = new DataTable("SampleTable");
dt.Columns.Add("ColumnA", Type.GetType("System.Int32"));
dt.Columns.Add("ColumnB", Type.GetType("System.String"));
dt.Rows.Add(100, "AAA");
dt.Rows.Add(200, "BBB");
dt.Rows.Add(300, "CCC");
dt.AcceptChanges();
// マルチカラムコンボボックス型セルを設定します
FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType mc = new FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType();
mc.ListBorderStyle = BorderStyle.FixedSingle;
mc.ListResizeColumns = FarPoint.Win.Spread.CellType.ListResizeColumns.FitWidestItem;
mc.ShowColumnHeaders = false;
mc.ShowGridLines = false;
mc.DataSourceList = dt;
fpSpread1.ActiveSheet.Cells[1, 1].CellType = mc;
fpSpread1.ActiveSheet.Columns[1].Width = 100;
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
' データセットを作成します
Dim dt As New DataTable("SampleTable")
dt.Columns.Add("ColumnA", Type.GetType("System.Int32"))
dt.Columns.Add("ColumnB", Type.GetType("System.String"))
dt.Rows.Add(100, "AAA")
dt.Rows.Add(200, "BBB")
dt.Rows.Add(300, "CCC")
dt.AcceptChanges()
' マルチカラムコンボボックス型セルを設定します
Dim mc As New FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType
mc.ListBorderStyle = BorderStyle.FixedSingle
mc.ListResizeColumns = FarPoint.Win.Spread.CellType.ListResizeColumns.FitWidestItem
mc.ShowColumnHeaders = False
mc.ShowGridLines = False
mc.DataSourceList = dt
FpSpread1.ActiveSheet.Cells(1, 1).CellType = mc
FpSpread1.ActiveSheet.Columns(1).Width = 100
End Sub