DATATABLE select row issue [Solved]
DATATABLE select row issue [Solved]
H2wk
Posts: 14Questions: 0Answers: 0
Hi
So loving datatables but currently having an issue with the select event at the moment.
[code]
$('#table_id tbody tr').click(function () {
var aPos = oTable.fnGetPosition(this);
var aData = oTable.fnGetData(aPos)[0]
sendDataToServer('PERSONCLICK_' + aData);
});
[/code].
The code above works 100% on first pageload and first row click.
I have a jquery tabstrip that loads data relating to the selected row...
The moment I change the tab and the select a new row from the gird i get an error:
"Microsoft JScript runtime error: Unable to get value of the property '0': object is null or undefined"
and [code] oTable.fnGetPosition(this) [/code] returns null.
Any suggestions or comments?
(I am using async callback to load the grid)
I do have more than one datatable on the page. the second one of which is only populated when a specific tab is clicked.
So loving datatables but currently having an issue with the select event at the moment.
[code]
$('#table_id tbody tr').click(function () {
var aPos = oTable.fnGetPosition(this);
var aData = oTable.fnGetData(aPos)[0]
sendDataToServer('PERSONCLICK_' + aData);
});
[/code].
The code above works 100% on first pageload and first row click.
I have a jquery tabstrip that loads data relating to the selected row...
The moment I change the tab and the select a new row from the gird i get an error:
"Microsoft JScript runtime error: Unable to get value of the property '0': object is null or undefined"
and [code] oTable.fnGetPosition(this) [/code] returns null.
Any suggestions or comments?
(I am using async callback to load the grid)
I do have more than one datatable on the page. the second one of which is only populated when a specific tab is clicked.
This discussion has been closed.
Replies