フレキシグリッドからセルのテキスト値を取得しようとしています。ただし、そのエラーが発生し続けます。
これは、特定のセルのテキストを取得するための私の関数です (Flexigrid には「attr」がなく、代わりに「abbr」があります)。
function getSelectedCopyDates() {
var arr = new Array();
debugger;
//for every row that has a checked checkbox
$("tr").has(".noteCheckBox:checked").each(function(i) {
if ($(this.id) !== "checkAllNotes") {
//push the value of column(FName, LName) into the array
arr.push($("#" + this.id + "> td[abbr='EventDate'] > div").text());
}
});
return arr;
}
「checkAllNotes」(メインチェックボックス)をクリックしたときにのみ、そのエラーが発生します。チェックボックスを手動でチェックすると、すべて正常に動作します。
これが私のフレキシグリッドレイアウトです:
$('#viewNotesGrid').flexigrid({
url: url,
dataType: 'json',
method: 'get',
colModel: [{
display: '<input type="checkbox" class="noteCheckBox" id="checkAllNotes" />',
name: 'checkBox',
width: 20,
sortable: false,
align: 'center',
process: showDescription
}, {
display: 'Date',
name: 'EventDate',
width: 80,
sortable: true,
align: 'center',
process: showDescription
},