作成日: 2026/04/01 最終更新日: 2026/04/01
文書種別
不具合
発生環境
SP10 (10.0.4015.2013)
※SP9(10.0.4014.2013)では発生しません。
状況
回避方法あり
詳細
以下のセル型を設定したシートをブラウザで表示すると、HTMLの出力サイズが不正に大きくなります。
- 編集可能なセル型:標準型セル, 日付型セル, テキスト型セル, 整数型セル, 倍精度型セル, 通貨型セル, パーセント型セル
- グラフィカルなセル型:コマンドボタン型セル, マルチカラムコンボボックス型セル, リストボックス型セル
- AJAX Control Toolkitを使用したセル型:オートコンプリート型セル, カレンダー型セル, Ajaxコンボボックス型セル, フィルタテキスト型セル, マスク編集型セル, 相互排他チェックボックス型セル, 数値スピン型セル, レーティング型セル, スライダー型セル, スライドショー型セル, ウォーターマーク型セル
回避方法
ShowPopupButtonプロパティがfalseである場合は、GetEditorControlメソッドをオーバーライドしたカスタムセルを作成する方法が有効です。
※ShowPopupButtonプロパティがtrueの場合の回避策はありません。
using FarPoint.Web.Spread;
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 cellType = new DateTimeCellType();
var cellType = new CustomDatetimeCellType(); // 回避策
・・・
}
}
}
// 回避策
internal class CustomDatetimeCellType : DateTimeCellType
{
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;
}
}