Initialise two extension for one table

Initialise two extension for one table

jigar311982jigar311982 Posts: 70Questions: 31Answers: 0

How to initialise two extension for one table, example i want tabletools to export data and also need extension for show\hide column, i tried initialize both but only one was possible, how to do this?

Thanks,

Answers

  • visionxvisionx Posts: 22Questions: 4Answers: 5

    You can define them in "sDom" option in datatable.

                        "sDom": '<"pull-right"CT><"pull-left"p>rti',
    
  • jigar311982jigar311982 Posts: 70Questions: 31Answers: 0

    Hi, Thanks, it now shows both extensions, but my search and selection for rows per page disappeared!, any thoughts why?

    Thank you,

  • visionxvisionx Posts: 22Questions: 4Answers: 5
    edited March 2015

    You need to add them in the "sDOm" option. Try as follows.

    "sDom": '<"pull-right"CT><"pull-left"plf>rti', 
    
  • jigar311982jigar311982 Posts: 70Questions: 31Answers: 0

    Thanks, This worked, with one problem only,
    My pagination numbers are shifted on top middle, instead of bottom right of table. Is this due to css?
    Can you tell me how did you create this sDom logic?
    I might need to create another possibilities for extensions,

    Thank you,

  • visionxvisionx Posts: 22Questions: 4Answers: 5

    You can inspect actual dom positioning through developer tools available in the browsers.

    I just gave you the sample. You may need to move "p" option as your wish.

    "sDom": '<"pull-right"CT><"pull-left"lf>rtip', 
    

    https://datatables.net/examples/basic_init/dom.html

This discussion has been closed.