private void Form1_Load(object sender, EventArgs e)
{
DataTable emp = new DataTable();
emp.Columns.Add("氏名");
emp.Columns.Add("所属");
emp.Rows.Add(new Object[] { "葡萄 花子", "営業部" });
emp.Rows.Add(new Object[] { "仙台 一郎", "開発部" });
GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType gccombo = new GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType();
gccombo.DataSource = emp;
// セルへの表示形式を設定します
gccombo.TextFormat = "[0] 所属:[1]";
fpSpread1.Sheets[0].Cells[0, 0].CellType = gccombo;
}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim emp As New DataTable()
emp.Columns.Add("氏名")
emp.Columns.Add("所属")
emp.Rows.Add(New [Object]() {"葡萄 花子", "営業部"})
emp.Rows.Add(New [Object]() {"仙台 一郎", "開発部"})
Dim gccombo As New GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType()
gccombo.DataSource = emp
' セルへの表示形式を設定します
gccombo.TextFormat = "[0] 所属:[1]"
FpSpread1.Sheets(0).Cells(0, 0).CellType = gccombo
End Sub