"bVisible": false not work in IE11 Preview and DataTables 1.10.0-dev

"bVisible": false not work in IE11 Preview and DataTables 1.10.0-dev

tstartstar Posts: 36Questions: 0Answers: 0
edited August 2013 in Bug reports
DataTables 1.10.0-dev

"aoColumnDefs": [
{ "aTargets": [0], "mData": "Test", "sDefaultContent": false, "bSortable": false, "bSearchable": false, "bVisible": false },
....
]

This colunn always visible in IE11 Preview, in other (not IE) browsers his work fine.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you link me to a test case please? I've just tried the column visibility example ( http://datatables.net/release-datatables/examples/basic_init/hidden_columns.html ) driven by DT 1.10-pre in IE11 and it seems to work okay.

    Allan
  • tstartstar Posts: 36Questions: 0Answers: 0
    I'll try, but it will not be easy, because I'm using Ajax request.
  • tstartstar Posts: 36Questions: 0Answers: 0
    Hmmm. Very strange. Yesterday, the whole day I suffer with this problem, and now everything works fine. Yesterday, in the DataTables-1_10_wip\examples\basic_init\hidden_columns.html I had 5 columns, today - 3. And it is only in IE 11. Ok, we assume it is as strange glitch. Sorry.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Very odd! If you see it again - let me know :-)

    Allan
  • tstartstar Posts: 36Questions: 0Answers: 0
    Ohhh. I get it. This occurs when set to "bStateSave": true and it's very strange. Visibility state of the column remained in the cookies. That's why I had this problem.
  • tstartstar Posts: 36Questions: 0Answers: 0
    This is not a browser problem. It is a problem of logic DataTables. I made ​​a table with two visible columns A and B, and set "bStateSave" to true. Then I wanted to hide the column A, but this has no effect because the visibility state of the column is stored in a cookie. I think "bVisible" from "aoColumnDefs" should have the highest priority over the value of the cookie. Am I right?

    "sDefaultContent", "bSortable", "bSearchable" has the same problem with cookies that "bStateSave"?
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    > I think "bVisible" from "aoColumnDefs" should have the highest priority over the value of the cookie. Am I right?

    No - the state storage (its localStorage in DT 1.10, not a cookie) will take priority. If the column initialisation took priority, then there would be no point in using state storage since it would never be used - the initialisation would always be used!

    Allan
  • tstartstar Posts: 36Questions: 0Answers: 0
    I understand that, but for me it was a big problem, it took 2 days for that to understand what the problem was. I use a hidden virtual column to store the additional data after a user action. Then this data is transmitted to the server. For testing, I have made this column is visible, but after testing could not hide it. How to solve this problem? Rename the table? Rename a column? But it all adds to the potential problems, because you can forget to rename something else in the code. Maybe I can completely eliminate hidden column in my case?
  • tstartstar Posts: 36Questions: 0Answers: 0
    I get an error when I change the value of the hidden field and do the sorting table on a different column. Now I can not properly describe this error.

    [code]
    Uncaught TypeError: Object # has no method 'replace' jquery.dataTables.js:13600
    _stripHtml jquery.dataTables.js:13600
    _htmlNumeric jquery.dataTables.js:13607
    (anonymous function) jquery.dataTables.js:13638
    _fnColumnTypes jquery.dataTables.js:472
    _fnSort jquery.dataTables.js:3918
    _fnReDraw jquery.dataTables.js:1604
    _fnSortListener jquery.dataTables.js:4124
    (anonymous function) jquery.dataTables.js:4155
    [/code]

    [code]
    var _stripHtml = function ( d ) {
    return d.replace( _re_html, '' );
    };
    [/code]
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you link me to the page please? It sounds like DataTables is doing a sort on a column which has an object as the data source rather than a string.

    Regading the visibility - I'm sorry this cost you time. I'm not sure how it can really be solved to be honest. If aoColumns / aoColumnDefs were used over the state saved options, then the saved state would never be used, and having it at all would be fairly pointless. I will look at adding a 'reset' option into DataTables though which might possibly help in future.

    Allan
  • tstartstar Posts: 36Questions: 0Answers: 0
    [quote]Can you link me to the page please?[/quote]
    Oh sorry. I have remade the algorithm, excluding the hidden column. Now I directly save a hidden value in the data source. This has solved all the previous problems, except for the problem with the fnGetPosition on another page.
This discussion has been closed.