下拉列表加载数据(ComBobox) 列表追加 FarPoint.Win.Spread.CellType.ComboBoxCellType cb4 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cb4.ListWidth = 96; cb4.Editable = true; cb4.MaxDrop = 10; cb4.MaxLength = 1; string[] priceTagList = new string[]...{" 0 無し"," 1 有り"}; cb4.Items = priceTagList; this.spdSetList.ActiveSheet.Columns[4].CellType = cb4; 数据库追加 FarPoint.Win.Spread.CellType.ComboBoxCellType cb12 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cb12.ListWidth = 150; cb12.Editable = true; cb12.MaxDrop = 10; cb12.MaxLength = 8; string[] employeeList = DataSetToArray(dsEmployee, 8); cb12.Items = employeeList; this.spdSetList.ActiveSheet.Columns[12].CellType = cb12;private string[] DataSetToArray(DataSet ds, int BlankNum) ...{ int i = 0; int NumLength = 0; string[] returnArray = new string[ds.Tables[0].Rows.Count]; DataRow foundRows = ds.Tables[0].Rows[ds.Tables[0].Rows.Count -1]; NumLength = foundRows[0].ToString().Length; foreach(DataRow dr in ds.Tables[0].Rows) ...{ returnArray[i] = dr[0].ToString().PadLeft(BlankNum, ' ') + " " + dr[1].ToString(); i++; } return returnArray; }