Filter differently?

Filter differently?

hhmhhm Posts: 24Questions: 3Answers: 2
edited March 2009 in General
Filtering can be a very efficient way to reduce the information a table holds to the part the user wants to see. But there is one caveat: the user has to know what to filter for. In larger tables and with pagination working these informations might not be obvious. So how to let the user know about the choices he has?

I came up with this: it would be great to get dataTables to create a HTML select for every column containing one select entry for every occuring value in this column (plus one for show all values)? Then the user could choose one value and the table would get filtered accordingly[1]. Alternatively check boxes might be useful making it possible to apply more than one filter to a column.

[1]This might even be expandable to a kind of tab navigation. Select one column of the table and the occuring values produce one tab each. One tab is default, clicking on another one filters the table accordingly.

Any ideas to implement this with the current tools or should this go onto the wish list?

Regards,
Hans

Replies

  • allanallan Posts: 63,578Questions: 1Answers: 10,483 Site admin
    Hi Hans,

    This certainly can be implemented with DataTables as it stands. The biggest part of getting this to work is simply to get your SELECT option as you need it to be. So what you would need to do is parse through the table and grab the data you want, populate the SELECT and then add a 'change' event handler to the menu. When it is changed you would simply filter the table as required.

    Hope this helps!
    Allan
This discussion has been closed.