[resolved] Filter rows (2 posts)

  1. Hockeyguy1925
    Posted 2 years ago #

    Hi Tobias,
    I have a table on a page with two tabs. Tab 1 is labeled "all-time" Tab 2 is labeled "Current". The same table shows under each tab just filtered.

    Table 1 has filter "total" with search turned on. The table has a list of players and the seasons played with their stats from that season. when the user clicks on tab one it shows the table filtered with all rows with "total" which shows all career stats for each player.

    When user clicks on tab 2, "current", it would filter all players on roster in a certain season with stats, say, 2013-14 for example.

    Table Looks similar to below:

    row 1 Player 1 season 1
    row 2 Player 1 season 2
    row 3 Player 1 Total
    row 4 Player 2 season 1
    row 5 Player 2 season 2
    row 6 Player 2 season 3
    row 7 Player 2 total

    I want the user to be able to type in search box a particular season so it brings up the roster with players stats. The problem is that I have table filtered with"total" for tab 1 and "2013-14" for tab 2. I dont want any more tabs if possible. I also would like if all seasons for each player didnt show as if a filter was off.

    I have row-filter extension enabled and have added the following custom commands typed in:
    "aoColumnDefs": [ { "bVisible": false, "aTargets": [1] },
    {"bSearchable": false, "aTargets": [2,3,4,5,6,7,8,9,10] },
    {"bSortable": false, "aTargets": [0] }]

    In first command the [1] is season column with season 1,2,3 etc and total. In second command [2,3 etc] are stats columns and in third command [0] is player name.

    I am sending link via email (subject: table Filter) so you can see how it is layed out.

    Thanks for your help as always.


  2. TobiasBg
    Plugin Author

    Posted 2 years ago #


    thanks for your question, and for the link in the email.

    I think I understand what you are trying to do, but I don't really see an easy solution here.
    The best approach I see is a JavaScript-only approach, so that you wouldn't actually use the Row Filter Extension (unless maybe to really keep the tabs for "Total" and for "Single Season").
    Then, you would need a solution that does the filtering in JavaScript. One idea for that could be something like the TablePress Column Filter Extension from http://tablepress.org/extensions/datatables-columnfilterwidgets/ , that would give you a dropdown list for the season.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic