Group By Column
-
Hello!
Thanks for all the work on your plug-in, it’s been a pleasure to use.
I’ve browsed the 40+ pages in support and either missed or didn’t see a similar question so forgive me if I am asking about something that has already been addressed.
I would like to know if it is possible to group entries in a table based upon a column value and give the viewer the ability to expand a select group of rows. For instances…
Imagine a table with 3 columns
Column one is a person’s name
Column two is a person’s phone number
Column three is the city they live inI would like to group the entries by city then be able to expand the listing for a desired city to show all entries for that city.
Is this possible to do with the plug-in as it exists today or would it require custom programming on your part?
Thank you
-
Hi,
thanks for your question.
Unfortunately, I’m not aware of an existing “Expand” solution, but there is at least something that should be helpful for the grouping:
With the TablePress Extension from http://tablepress.org/extensions/datatables-rowgrouping/ you can use the effect that is visible in the table at http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/default.html (select “100” from the “Show entries” dropdown there to better see it).
To use that, just install that Extension and extend your table’s Shortcode to[table id=123 datatables_rowgrouping=true /]The values in the first column will be taken as the group, so you would have to move your city column to the first column on the table’s “Edit” screen.
Regards,
TobiasTobias,
Thank you for the incredibly fast response! I’ll try that extension but from your description is sounds like I should be able to make it work.
Rick
Hi,
sure, no problem! You are very welcome! 🙂
Good to hear that that Extension will be helpful!Best wishes,
Tobias
The topic ‘Group By Column’ is closed to new replies.