私はjqueryで次のコードを書きました:
$('input[type="text"]').keyup(
function (event) {
// Allow: backspace, delete, tab, escape, and enter
if (event.keyCode != 68 && event.keyCode != 186) return;
var textbox = $(this);
var clickAttr = textbox.attr('click');
if (clickAttr != undefined && clickAttr.indexOf('NumericTextBoxKeyPress') > -1) return;
var insertedValue = textbox.val();
insertedValue = insertedValue.replace(/a/g, 'SampleA');
insertedValue = insertedValue.replace(/b/g, 'SampleB');
textbox.val(insertedValue);
}
);
通常のテキストボックスでは問題ありませんが、上記のコードはjQGridフィルタリングのテキストボックスでは機能しません。
キーアップ関数をjQGridフィルタリングのテキストボックスにバインドする方法を教えてください。