作成日: 2026/02/12 最終更新日: 2026/02/12
文書種別
不具合
発生環境
SP10 (10.0.4015.2013)
※SP9(10.0.4014.2013)では発生しません。
状況
回避方法あり
詳細
ShowEditorプロパティをFalseに設定したAjaxコンボボックス型セルを列に設定した場合、実行時、セルをダブルクリックしても編集モードになりません。
※この問題は最終行以外のAjaxコンボボックス型セルで発生します。
※ShowEditorプロパティがTrueのAjaxコンボボックス型セルの場合は正常に動作します。
回避方法
GetEditorControlメソッドをオーバーライドしたカスタムセルを作成する方法が有効です。
using FarPoint.Web.Spread;
using FarPoint.Web.Spread.Extender;
using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
・・・
var sheet = FpSpread1.ActiveSheetView;
//sheet.Columns[0].CellType = new AjaxComboBoxCellType();
sheet.Columns[0].CellType = new ColumnAjaxComboBoxCellType(); // 回避策
{
・・・
};
}
}
}
// 回避策
internal class ColumnAjaxComboBoxCellType : AjaxComboBoxCellType
{
Control _editorControl;
public override Control GetEditorControl(string id, TableCell parent, Appearance style, Inset margin, object value, bool upperLevel)
{
if (_editorControl == null)
{
_editorControl = base.GetEditorControl(id, parent, style, margin, value, upperLevel);
}
return _editorControl;
}
}
}