Question about filtering/sorting with column spans

Question about filtering/sorting with column spans

calbear81calbear81 Posts: 4Questions: 0Answers: 0
edited March 2011 in General
Hi Allan, first of all thank you for your work on DataTables, I just started using it as part of the WP-Table reloaded plugin in a Wordpress-powered site I'm testing. The site is www.menuly.com and the idea is to aggregate sortable restaurant menus starting in San Francisco.

I found the DataTables filtering to be exactly what I was looking for. The one thing was being able to add sub sections and still retain the filtering/sorting capability. I saw an older thread from 2009 that appeared to have come up with a lot of good suggestions on how to handle this, was there any further development?

Thanks in advance!

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Hi calbear81,

    Could you possibly link to the thread? I totally can't remember it :-) Is it something like this that you are looking for: http://datatables.net/examples/api/row_details.html ?

    Allan
  • calbear81calbear81 Posts: 4Questions: 0Answers: 0
    edited March 2011
    Allan, here's the thread: http://datatables.net/forums/comments.php?DiscussionID=14

    Hmmm.. I'm not sure if row details would work. I want to group row items under sub-sections such as "Salad" then "Green Salad", "Caesar Salad". I have some restaurant menus with 100s of items in about 12+ categories and it would make it much easier for users to read if I could group them and then style the subheadings with CSS.

    Thanks!
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Ah I see! How about this example: http://datatables.net/examples/advanced_init/row_grouping.html - which as I recall was written as a result of that thread :-)

    Allan
  • calbear81calbear81 Posts: 4Questions: 0Answers: 0
    Thank you Allan! This looks exactly like what I would need! I'm not a programmer so I'll need to figure out if this can be enabled in WP-Table Reloaded.
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    As long as WP-Table Reloaded allows you to customise the initialisation options, then it shouldn't be a problem :-) Not sure exactly how it does its initialisation though...

    Allan
  • calbear81calbear81 Posts: 4Questions: 0Answers: 0
    The developer actually wrote a small plugin to provide this option after I pointed him at the page you sent! It's working perfect, I just add a tag to enable grouping mode and then the first column is set to group based on the value. Thanks for your help!
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Very cool :-). And my pleasure - good to hear you got it going!

    Regards,
    Allan
This discussion has been closed.