Fixed Columns Themed

Fixed Columns Themed

MattSkeldonMattSkeldon Posts: 19Questions: 1Answers: 0
edited May 2013 in Plug-ins
http://www.datatables.net/release-datatables/extras/FixedColumns/themed.html

Hi, Love The Tables/Plugins.

Unfortunatly I wish to use the following setup on one of my already existing tables.
However if you use the search filter or paginiation (and this includes on the example site) then the fixed columns do not update, they just remain how they are. Is this by design (no idea why), if so is there a known fix, so that searching both the fixed columns and scrollable columns filter correctly.

Replies

  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    > is there a known fix

    Yes, update tot he development version available on the downloads page as the current nightly. This is a bug in the release. I'll make a new release soon.

    Allan
  • MattSkeldonMattSkeldon Posts: 19Questions: 1Answers: 0
    Allan, you could well be a life saver. Finished work now, but ill leave some feedback regarding my installation on Monday. Thanks
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    Sounds great - feedback is always welcome!

    Allan
  • MattSkeldonMattSkeldon Posts: 19Questions: 1Answers: 0
    edited May 2013
    Hey allan, presuming i have downloaded the correct version the issue is still not fixed.

    Firebug shows the following error.

    TypeError: t.fnSettings(...) is null
    [Break On This Error]

    ...height=i+"px",t.right.body.style.height=n(this.dom.scroller).height()+"px")},_fn...


    This is the code i use to initialise the tables.

    [code]
    var oTable = $("#datatable").dataTable({
    "bJQueryUI": true,
    "iDisplayLength": 15,
    "sScrollX": "4000",
    "bScrollCollapse": true
    });
    new FixedColumns(oTable, {
    "iLeftColumns": 2,
    "iLeftWidth": 250
    });
    [/code]
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    Can you link me to a page showing the error then please?

    Allan
  • MattSkeldonMattSkeldon Posts: 19Questions: 1Answers: 0
    Unfortunatly I wont be able to, as it is a web application currently in development. Apologies.

    Can I confirm that the two files I should be including are the following :

    http://www.datatables.net/download/build/jquery.dataTables.nightly.js
    http://www.datatables.net/download/build/FixedColumns.nightly.js
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    Yes - they should work. I've just tried it on my local machine and it appears to work okay.

    Allan
  • MattSkeldonMattSkeldon Posts: 19Questions: 1Answers: 0
    edited May 2013
    Hi there.

    I have had another crack at this this morning, and still getting the same issue.

    Using the code from the example (see first post)

    [code]
    $(document).ready( function () {
    var oTable = $('#example').dataTable( {
    "bJQueryUI": true,
    "sScrollY": "300px",
    "sScrollX": "100%",
    "sScrollXInner": "150%",
    "bScrollCollapse": true,
    "bPaginate": false
    } );
    new FixedColumns( oTable );
    } );
    [/code]

    Removing the line
    new FixedColumns( oTable );

    for the time being is acceptable, but I would very much love to use these tables to their full capablities.
    Is there anything you can think of that may break this?

    If it is any help this is the line that actually errors. (Previously I was using the automatic minify built into Visual Studio, which somewhat masked the actual problem)

    "iTableColumns": oDT.fnSettings().aoColumns.length,

    Line 83, fixed columns js file.

    It may also be worth noting that I get this error now, even if bJqueryUI is false.
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    This is your code from above using the latest FixedColumns nightly: http://live.datatables.net/ihalob/edit#javascript,html . It appears to be working okay for me :-).

    I really need a way to be able to reproduce the error to be able to offer any help.

    Allan
  • MattSkeldonMattSkeldon Posts: 19Questions: 1Answers: 0
    What a grade a plonker I have been. Can only begin to apologise.

    Whilst building up the table, if no rows are added, I display a message instead of constructing a table.

    Then I try and change the table (that has not been created) into a datatable.

    The fix you applied to the nightly (the original) problem seems to be working a treat.

    Thanks, and apologies again.
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    No worries - good to know that the nightly works :-). Its edging closer to a proper release!

    Allan
  • rogertrrogertr Posts: 2Questions: 0Answers: 0
    Another issue is that you cannot sort on column 0 when jQueryUI themed. Clicking it, just sorts column 1. Any known fix?
  • rogertrrogertr Posts: 2Questions: 0Answers: 0
    An example is here -> http://datatables.net/release-datatables/extras/FixedColumns/themed.html
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    Is that the case with the nightly as well? (I can't test as I'm away from my main machine at the moment).

    Allan
This discussion has been closed.