Support » Plugin: TablePress » Customization of colum filters dropdown

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post! As I have already answered via email:
    Sorry, I don’t know a solution to that 🙁 This would have to be
    changed in the external JavaScript code of the ColumnFilterWidgets,
    but unfortunately, I don’t know how to do that 🙁 The sorting is
    always alphabetical by default.

    Regards,
    Tobias

    Thanks for your reply.

    I tried the below code but it not work

    $('#tablepress-2_wrapper').dataTables_wrapper()
    .columnFilter({
    aoColumns: [ { type: "select", values: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] },
    { type: "text" },
    null,
    { type: "number" },
    { type: "select" }
    ]

    });

    I found this from the below link,

    http://jquery-datatables-column-filter.googlecode.com/svn/trunk/customFilters.html

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    that code is not for the ColumnFilterWidgets library, but for a different one, the “Column Filter”. Also, the correct code would have to be

    $('#tablepress-2').dataTables().columnFilter( {
      aoColumns: [
        { type: "select", values: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] },
        { type: "text" },
        null,
        { type: "number" },
        { type: "select" }
      ]
    } );

    That of course would only work for a table with the same structure (5 columns) as in the example table in the link.

    Regards,
    Tobias

    HI TobiasBg

    The month sorting issue is solved, i changed some lines in the jQuery file ColumnFilterWidgets.js

     if (widget.bSort && select_title != 'Month') {
                    if (widget.hasOwnProperty('fnSort')) {
                        aDistinctOptions.sort(widget.fnSort);
                    } else {
                        aDistinctOptions.sort();
                    }
    

    Now everything is working perfectly. Also changed the drop down filter multi selecting option, now it will come inside the select box.

    http://www.inpressadv.net/staging/blueocean/final/courses-calendar/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, very nice! Thanks for sharing this! Hopefully, this will be helpful to others as well!

    Best wishes,
    Tobias

    Hi TobiasBg

    Your plugin rocks dude.However now im facing a problem in filtering.My client dosnt need the text(selected item) which comes down in droapdownlist area..

    2.when i select one university that particular university must be show..other options showld not show..

    aslike Poojith’s table i must get dude..

    Please help me out dude..

    below is my website link
    http://krystl.co

    username:center1
    password:center1

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question.

    You can hide that text with some CSS very easily:

    #tablepress-123_wrapper .column-filter-widgets .filter-term {
      display: none;
    }

    (Change the 123 to the correct table ID.)

    However, you should keep in mind that the user then does not have a way to select something else.

    Regards,
    Tobias

    Thanks for the reply TobiasBg..

    What i want exactly is like below link.

    http://www.inpressadv.net/staging/blueocean/final/courses-calendar/

    please i want exactly the same..

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sorry, you will then have to speak to poojith directly. It seems that he has made some special customizations and modifications to the JavaScript code, but I’m not familiar with them.

    regt

    Where can i get the tablepress- datatables-multi-filter-select plugin..

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    that’s available at http://tablepress.org/extensions/multi-filter-select/

    Regards,
    Tobias

    Should i uninstall other extensions? And after install in wordpress any other changes should i do?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I’m confused now. As I just said: http://tablepress.org/extensions/multi-filter-select/

    Regards,
    Tobias

    Should i uninstall other extensions? And after install in wordpress any other changes should i do?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no, you should not have to uninstall other Extensions. Just be aware that not all Extensions work together, because they change the same piece of JavaScript code.

    To activate the Extension, extend your table’s Shortcode to

    [table id=123 datatables_multi_filter_select=true /]

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Customization of colum filters dropdown’ is closed to new replies.