回复 9楼tingche的帖子
tingche 你好,
设置显示 Combo 的属性为 ShowEditor。测试代码如下:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- System.Data.DataSet data = new System.Data.DataSet("data");
- data.Tables.Add("Table1");
- data.Tables["table1"].Columns.Add("dataText");
- data.Tables["table1"].Columns.Add("dataValue");
- data.Tables["table1"].Rows.Add("WinSpread", "1");
- data.Tables["table1"].Rows.Add("WebSpread", "2");
- data.AcceptChanges();
- FarPoint.Web.Spread.Extender.AjaxComboBoxCellType combo = new FarPoint.Web.Spread.Extender.AjaxComboBoxCellType();
- //combo.ShowEditor = true;
- combo.DataSource = data;
- combo.DataMember = "table1";
- combo.DataTextField = "dataText";
- combo.DataValueField = "dataValue";
- FpSpread1.Sheets[0].Cells[0, 0].CellType = combo;
- }
复制代码 |