This topic contains 5 replies, has 2 voices, and was last updated by Sean Sean 2 years, 6 months ago.

FixedHeader Plugin Initialize


  • dietcheese
    Participant

    Posts: 5
    Member Reply #2314

    Hi,

    I am attempting to use the FixedHeader plugin that comes with Metronic, on the ajax datatable seen

    here

    The table without fixedHeader is working fine and I have correctly included /global/plugins/datatables/extensions/FixedHeader/js/dataTables.fixedHeader.js.

    However, I am not sure where to put the javascript that initializes the plugin.  For example, this does not work:

    var handleRecords = function () {

    var grid = new Datatable();

    new $.fn.dataTable.FixedHeader( grid  );

    }

    I have also tried various permutation of the command, as well as putting it in the /global/scripts/datatable.js file.

    Where and how should I initialize the FixedHeader plugin to get this working?

    Thanks,
    DC

     

    Sean
    Sean
    Keymaster

    Posts: 4221
    Support Staff Reply #2340

    Hi :),

    To integrate the scroller extension with ajax datatables you will need to follow below steps:

    1) Sure you added required css and js files

    2) Initialize the datatable instance with “scrollY”: “300” and “deferRender”: true parameters

    var grid = new Datatable();

    grid.init({
    src: $(“#datatable_ajax”),
    …………………….
    dataTable: {
    ……………..
    “bStateSave”: true, // save datatable state(pagination, sort, etc) in cookie.
    “scrollY”: “300”,
    “deferRender”: true,
    ……………..
    }
    });

    If you need any further assistance please let us know.

    Thanks.


    dietcheese
    Participant

    Posts: 5
    Member Reply #2342

    Please read my initial post.

    I am trying to use the FixedHeader plugin, not the scroller plugin.

     

     

    Sean
    Sean
    Keymaster

    Posts: 4221
    Support Staff Reply #2365

    Hi,

    Sorry for the misunderstanding. At the moment the fixed header integrating is not implemented. We will check it further and consider adding it in a future releases soon. Stat tuned!

    Thanks.


    dietcheese
    Participant

    Posts: 5
    Member Reply #2367

    Can you provide me with some information on how I can implement it myself?

    Sean
    Sean
    Keymaster

    Posts: 4221
    Support Staff Reply #2368

    Hi,

    Please let me try to implement it first and i will let you know further. You can email our support at support@keenthemes.com with a reminder and we will update you asap once we have any progress on this.

    Thanks.

You must be logged in to reply to this topic.