ナレッジベース
ひとつ前のコントロールからTabキーによりフォーカスを取得するとセルが編集モードにならない
対象製品
MultiRow for ASP.NET 1.0J
ステータス
回避方法あり
詳細
Tabインデックスがひとつ前のコントロールからTabキーによりMultiRowがフォーカスを取得すると、EditModeプロパティがEditOnEnterに設定されていても現在のセルが編集状態になりません。
回避方法
以下の回避スクリプトFixEditOnEnter()をページのonloadイベントで呼び出すことで回避できます。
[JavaScript]
<head runat="server">
<script type="text/javascript">
// 以下は製品の内部仕様に基づく実装のため、本回避方法以外の用途に
// ご使用になった場合の動作については、サポートサービスの対象外となります。
function FixEditOnEnter()
{
if (GcMultiRow != undefined && GcMultiRow.prototype.getFocus != undefined)
{
GcMultiRow.prototype.__oldmrContainerActivate = GcMultiRow.prototype.mrContainerActivate;
GcMultiRow.prototype.mrContainerActivate = GcMultiRowmrContainerActivate;
}
}
function GcMultiRowmrContainerActivate()
{
var nofcous = false;
if (!this._hasGottenFocus)
{
nofcous = true;
}
this.__oldmrContainerActivate();
if (this._editmode == MREditMode.EditOnEnter && nofcous)
{
var paramObj = { "rowIndex": this._currentRowIndex,
"cellIndex": this._currentCellIndex,
"isCellFixed": true,
"isSelectAll": false,
"isTriggleClick": false
};
this.navigateAndEditCell(paramObj);
}
}
</script>
</head>
<body onload="FixEditOnEnter()">
[JavaScript]
<head runat="server">
<script type="text/javascript">
// 以下は製品の内部仕様に基づく実装のため、本回避方法以外の用途に
// ご使用になった場合の動作については、サポートサービスの対象外となります。
function FixEditOnEnter()
{
if (GcMultiRow != undefined && GcMultiRow.prototype.getFocus != undefined)
{
GcMultiRow.prototype.__oldmrContainerActivate = GcMultiRow.prototype.mrContainerActivate;
GcMultiRow.prototype.mrContainerActivate = GcMultiRowmrContainerActivate;
}
}
function GcMultiRowmrContainerActivate()
{
var nofcous = false;
if (!this._hasGottenFocus)
{
nofcous = true;
}
this.__oldmrContainerActivate();
if (this._editmode == MREditMode.EditOnEnter && nofcous)
{
var paramObj = { "rowIndex": this._currentRowIndex,
"cellIndex": this._currentCellIndex,
"isCellFixed": true,
"isSelectAll": false,
"isTriggleClick": false
};
this.navigateAndEditCell(paramObj);
}
}
</script>
</head>
<body onload="FixEditOnEnter()">
キーワード
MRAP08534


