Additional drop down menus

Additional drop down menus

ChrisGChrisG Posts: 29Questions: 0Answers: 0
edited August 2013 in TableTools
I'd like to add some custom drop down menus that resemble the column filtering example in TableTools. But it seems like I'd have to go in and edit deep into some files to implement it... Is there any simple solution for this? I basically want to make an extra drop down list next to the column filter which lets me select checkboxes to filter specific words.

Any help is much appreciated! Thanks!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Do you mean having a drop down button collection like in this example http://datatables.net/release-datatables/extras/TableTools/collection.html which will trigger filtering when clicked on?

    I'm not quite sure which TableTools example you are referring to with column filtering I'm afraid - could you link me to it?

    Thanks,
    Allan
  • ChrisGChrisG Posts: 29Questions: 0Answers: 0
    Tried to link it but I dunno what happened with the post.

    Basically I want a custom drop down list similar to what you linked (but basically like the ColVis example) I want to list some different keywords with check boxes next to them and when they are checked, it will filter those words in a specific column. :) I know the specific column filtering is possible and I believe I can figure that part out, but I'm not quite sure the easiest way to go about adding in custom drop down menus that match the existing ones. Since you add the Colvis button collection just through the sDom.
  • ChrisGChrisG Posts: 29Questions: 0Answers: 0
    Ah it's the ColVis example:

    http://datatables.net/release-datatables/extras/ColVis/index.html

    But yes, basically what you linked before
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Okay - thanks for the explanation. In that case, TableTools with a `div` button ( http://datatables.net/extras/tabletools/buttons#div ) and an fnClick handler ( http://datatables.net/extras/tabletools/button_options#fnClick ) which calls the DataTables fnFilter function sounds like exactly what you want.

    TableTools can also be added through sDom ( `T` option) - but you need to configure it to do what you want.

    Regards,
    Allan
  • ChrisGChrisG Posts: 29Questions: 0Answers: 0
    Thanks.

    But I can't seem to make a custom button collection this way... I also want to position this button elsewhere in the table header. (not with the other buttons)

    I want a button collection dropdown with checkbox items like the ColVis example... only I want to be able to put it wherever I need to put it...

    Would this require some heavy editing to multiple files? I have this feeling like I need to create a custom sDom option or something... right?
This discussion has been closed.