0
私はページ上にグリッドがあります。行をクリックすると、ダイアログ内に項目データが表示された項目編集フォームが表示されます(jqueryダイアログのuiプラグイン)。 問題は、 '保存'ボタンをクリックした後、新しいユーザー入力でhtmlからデータ項目を取得することです。ここ は私のコードです:jqueryテンプレートプラグインで問題が発生する
$('#OutLookAccountsGrid').on('click', 'span.btnOutlookAccountEdit', function() {
//getting data from grid row
var account = $(this).tmplItem().data;
//populating edit template with data
var tbl = $('#outlookaccountEditFormTmpl').tmpl(account);
//displaying edit form inside dialog
tbl.dialog({
modal: true,
width: 400,
buttons: {
"Yes": function() {
var $this = $(this);
//PROBLEM!!! PROBLEM!!! PROBLEM!!!
//want to get values from user, but instead getting old values
//populated from grid row
var data = $.tmplItem(this).data;
//...
//want to send tmplItem with new values throught ajax as data param
//...
}
}
})//end of dialog
})
は、新しい値を持つオブジェクトを取得することが可能ですか?