Global filter breaks with Fixed Columns
Global filter breaks with Fixed Columns
markphillips
Posts: 4Questions: 0Answers: 0
I have a 14 column table using DataTables 1.9.4, and I fixed the left two columns and have a scrolling window for the user to scroll both vertically and horizontally to see the data. The site is developed using django 1.6 and is running in runserver testing mode. I enabled the global filter, and it works sometimes. The problems I have found include (all tests involve just one search term):
* with just one search term, it fails to find all the rows that has the search term
* When it finds some rows that have the search term, only the display to the right of the fixed columns is adjusted. The fixed columns are not changes, so the data in the rows that have the search term no longer match the row in the fixed columns.
Also, in general there are times that the table rows in the scrollable region do not always line up with the rows in the fixed columns. The only solution I have found is to refresh the display. Is there way to force a refresh in the javascript?
My javascript
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable({
"bJQueryUI": true,
"sScrollY": "400px",
"sScrollX": "100%",
"sScrollXInner": "200%",
"bPaginate": false,
"bSort": false,
"bFilter": true,
"bScrollCollapse": true,
"iDisplayLength": 5
} );
new FixedColumns( oTable, {
"iLeftColumns": 2,
"iLeftWidth": 250,
} );
} );
function fnShowHide( iCol )
{
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('#example').dataTable();
var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis( iCol, bVis ? false : true );
}
[/code]
My imports:
[code]
[/code]
There are no import errors when I check in the Chrome debugger.
Is there a place I can post a screen shot of the problem? The site has sensitive financial data and requires a login, and it is not yet running in production mode. But I could post some screen shots to show the problem.
Thanks,
Mark
P.S. I added some screen shots and descriptions to the following site - http://inky.ws/g/2xy. They will be available for a week from now. These screen shots demonstrate the issues I described above.
Thanks for any thoughts you may have on solving this problem. I must be missing some settings.
Mark
* with just one search term, it fails to find all the rows that has the search term
* When it finds some rows that have the search term, only the display to the right of the fixed columns is adjusted. The fixed columns are not changes, so the data in the rows that have the search term no longer match the row in the fixed columns.
Also, in general there are times that the table rows in the scrollable region do not always line up with the rows in the fixed columns. The only solution I have found is to refresh the display. Is there way to force a refresh in the javascript?
My javascript
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable({
"bJQueryUI": true,
"sScrollY": "400px",
"sScrollX": "100%",
"sScrollXInner": "200%",
"bPaginate": false,
"bSort": false,
"bFilter": true,
"bScrollCollapse": true,
"iDisplayLength": 5
} );
new FixedColumns( oTable, {
"iLeftColumns": 2,
"iLeftWidth": 250,
} );
} );
function fnShowHide( iCol )
{
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('#example').dataTable();
var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis( iCol, bVis ? false : true );
}
[/code]
My imports:
[code]
[/code]
There are no import errors when I check in the Chrome debugger.
Is there a place I can post a screen shot of the problem? The site has sensitive financial data and requires a login, and it is not yet running in production mode. But I could post some screen shots to show the problem.
Thanks,
Mark
P.S. I added some screen shots and descriptions to the following site - http://inky.ws/g/2xy. They will be available for a week from now. These screen shots demonstrate the issues I described above.
Thanks for any thoughts you may have on solving this problem. I must be missing some settings.
Mark
This discussion has been closed.
Replies
Allan
I copied the html generated from django and pasted it here - http://live.datatables.net/tiwayaf/1/edit. I looked at the output and tried to search on birds and you will see the problem.
Thanks,
Mark