Reordering of column causes data extraction error
Reordering of column causes data extraction error
newtodatatables
Posts: 31Questions: 0Answers: 0
Hi there, DataTables is really a cool tool to use! The column reordering provides increased usability. However, I am having problems extracting data from a selected column if a user reorders the table.
[code]
$('#table tbody tr').live('dblclick', function () {
var aData = $('#table').dataTable().fnGetData( this );
$( ".tabs" ).tabs('add', "jsp/test.jsp?id="+aData[0], "test");
});
[/code]
("ID") is my first column and is that data I want to extract when a user double clicks on the row. However, if a user reorders and shifts the ID column to the 3rd column, I will get an error when the user double clicks on the row. How do I solve this? Is there any way I can extract data based on the column header name? Thanks!
[code]
$('#table tbody tr').live('dblclick', function () {
var aData = $('#table').dataTable().fnGetData( this );
$( ".tabs" ).tabs('add', "jsp/test.jsp?id="+aData[0], "test");
});
[/code]
("ID") is my first column and is that data I want to extract when a user double clicks on the row. However, if a user reorders and shifts the ID column to the 3rd column, I will get an error when the user double clicks on the row. How do I solve this? Is there any way I can extract data based on the column header name? Thanks!
This discussion has been closed.
Replies