Problem with Multiple tables with rowReordering
Problem with Multiple tables with rowReordering
NathanielB
Posts: 6Questions: 0Answers: 0
Hello all,
I'm a newbie here and this is my first post. I'm having a problem with rowReordering when using multiple tables. I can reorder the first table just fine but the second table I can’t move the first few rows. I checked the code and oState.iNewPosition is showing the first rows to be -1. If I run the table by themselves then they work as intended.
The other problem I have is that rowReordering does not seem to work if I have "bSort” set to false. Is there a work around to remove the sort arrows in the ?
The first table
[code]
var oTable1 = $('#tableTop').dataTable(
{
"bPaginate" : false
,"bFilter" : true
,"bInfo" : false
//,"bSort" : false
,"bSortClasses" : false
,"bAutoWidth": false
,"oLanguage": {
"sSearch": ""
}
}).rowReordering({
bGroupingUsed: false,
iIndexColumn:0,
sURL:"{the path here}",
fnAlert: function(message) {
alert(message);
}
});
[/code]
The second table with rowGrouping
[code]
var oTable2 = $('#tableSide').dataTable(
{
"bPaginate" : false
,"bFilter" : true
,"bInfo" : false
//,"bSort" : false
,"bSortClasses" : false
,"bAutoWidth": false
,"oLanguage": {
"sSearch": ""
}
})
.rowGrouping({ iGroupingColumnIndex: 0 })
.rowReordering({
bGroupingUsed: true,
iIndexColumn:1,
sURL:"{the path here}",
fnAlert: function(message) {
alert(message);
}
});
[/code]
I'm a newbie here and this is my first post. I'm having a problem with rowReordering when using multiple tables. I can reorder the first table just fine but the second table I can’t move the first few rows. I checked the code and oState.iNewPosition is showing the first rows to be -1. If I run the table by themselves then they work as intended.
The other problem I have is that rowReordering does not seem to work if I have "bSort” set to false. Is there a work around to remove the sort arrows in the ?
The first table
[code]
var oTable1 = $('#tableTop').dataTable(
{
"bPaginate" : false
,"bFilter" : true
,"bInfo" : false
//,"bSort" : false
,"bSortClasses" : false
,"bAutoWidth": false
,"oLanguage": {
"sSearch": ""
}
}).rowReordering({
bGroupingUsed: false,
iIndexColumn:0,
sURL:"{the path here}",
fnAlert: function(message) {
alert(message);
}
});
[/code]
The second table with rowGrouping
[code]
var oTable2 = $('#tableSide').dataTable(
{
"bPaginate" : false
,"bFilter" : true
,"bInfo" : false
//,"bSort" : false
,"bSortClasses" : false
,"bAutoWidth": false
,"oLanguage": {
"sSearch": ""
}
})
.rowGrouping({ iGroupingColumnIndex: 0 })
.rowReordering({
bGroupingUsed: true,
iIndexColumn:1,
sURL:"{the path here}",
fnAlert: function(message) {
alert(message);
}
});
[/code]
This discussion has been closed.
Replies
var iCurrentPosition = oTable.fnGetData(tr[0], properties.iIndexColumn);
First table
echo "";
Second table
echo "";