Jeditable Tabbing (Cannot read property 'nTr' of undefined)
Jeditable Tabbing (Cannot read property 'nTr' of undefined)
atomicx6637
Posts: 3Questions: 0Answers: 0
I'm having a problem getting the Jeditable Tabbing fully implemented. I reviewed the following thread http://datatables.net/forums/discussion/482/tabsjeditable-not-quite-desired-results/p1 and used it as an example but I'm now getting and error "Uncaught TypeError: Cannot read property 'nTr' of undefined"
Any thoughts on what I'm missing and what might be causing this would be a huge help.
Thanks
Troy
Here is the code I'm using.
[code]
var oTable = $("#dataTable").dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "PCServ?controllerId=FARController&methodId=getFAREditData2",
"fnDrawCallback": function() {
$('.edit td').editable( 'PCServ?controllerId=FARController&methodId=submitFARData2', {
"onblur" : "submit",
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"col_id": this.getAttribute('id')
//"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px"
});
$('.edit td').bind('keydown', function(evt) {
if(evt.keyCode==9) {
/* Submit the current element */
$('input', this)[0].blur();
/* Activate the next element */
if ( $(this).next('.edit td').length == 1 )
{
$(this).next('.edit td').click();
}
else if ( $('.edit td', $(this.parentNode).next()).length > 0 )
{
$('.edit td:eq(0)', $(this.parentNode).next()).click();
}
return false;
}
} );
}
});
[/code]
Here is my data set, I have a larger data setup but I rolled back to this smaller one for troubleshooting and get the same issue.
[code]
{
"iTotalRecords":600,
"sEcho":"0",
"aaData":[
{
"0":1233,
"1":"Gecko",
"2":"Firefox 1.0",
"3":"Win 98+ / OSX.2+",
"4":"1.7",
"5":"A",
"DT_RowId":"7"
},
{
"0":1234,
"1":"Gecko",
"2":"Firefox 1.5",
"3":"Win 98+ / OSX.2+",
"4":"1.8",
"5":"A",
"DT_RowId":"8"
}
],
"iTotalDisplayRecords":600
}
[/code]
Here is my table in my HTML:
[code]
FAR Id
RFI Number
Date Received
Contract Number
Contract Description
Description
[/code]
Any thoughts on what I'm missing and what might be causing this would be a huge help.
Thanks
Troy
Here is the code I'm using.
[code]
var oTable = $("#dataTable").dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "PCServ?controllerId=FARController&methodId=getFAREditData2",
"fnDrawCallback": function() {
$('.edit td').editable( 'PCServ?controllerId=FARController&methodId=submitFARData2', {
"onblur" : "submit",
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"col_id": this.getAttribute('id')
//"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px"
});
$('.edit td').bind('keydown', function(evt) {
if(evt.keyCode==9) {
/* Submit the current element */
$('input', this)[0].blur();
/* Activate the next element */
if ( $(this).next('.edit td').length == 1 )
{
$(this).next('.edit td').click();
}
else if ( $('.edit td', $(this.parentNode).next()).length > 0 )
{
$('.edit td:eq(0)', $(this.parentNode).next()).click();
}
return false;
}
} );
}
});
[/code]
Here is my data set, I have a larger data setup but I rolled back to this smaller one for troubleshooting and get the same issue.
[code]
{
"iTotalRecords":600,
"sEcho":"0",
"aaData":[
{
"0":1233,
"1":"Gecko",
"2":"Firefox 1.0",
"3":"Win 98+ / OSX.2+",
"4":"1.7",
"5":"A",
"DT_RowId":"7"
},
{
"0":1234,
"1":"Gecko",
"2":"Firefox 1.5",
"3":"Win 98+ / OSX.2+",
"4":"1.8",
"5":"A",
"DT_RowId":"8"
}
],
"iTotalDisplayRecords":600
}
[/code]
Here is my table in my HTML:
[code]
FAR Id
RFI Number
Date Received
Contract Number
Contract Description
Description
[/code]
This discussion has been closed.
Replies
oTable.fnUpdate( sValue, aPos[0], aPos[1] );