• Resolved jmarkj

    (@jmarkj)


    Hi Tobias,

    I really like the plugin thus far, but I have one nagging issue. It seems that trying to invoke colspan when DataTables functionality is selected causes an error message that prevents saving changes. And the only way to get colspan to work is to deselect DataTables. Once my table was completed, I realized it was so long that I needed to invoke pagination so users would always see the header. At that point, I can select DataTables and pagination functionality at that point and save properly, but no pagination is actually reflected on the page. Are colspan and DataTables simply incompatible with each other? And if so, is there another way I should be invoking a colspan-type result of formatting column cells? You can see the table under development at this link: http://s90778212.onlinehome.us/pii/calendar/

    http://wordpress.org/extend/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Unfortunately, you nailed it: Colspan and DataTables are incompatible, unfortunately. Due to that, DataTables will raise that error message when being used on tables which have connected cells.

    Sorry for not having better news.

    Best wishes,
    Tobias

    Thread Starter jmarkj

    (@jmarkj)

    Hi Tobias, I have now progressed forward in time where we are trying to launch the site that I wanted to deploy TablePress in. However, now the client is adamant about wanting to have a result that is normally achieved by using Colspan. I realize that TablePress is not compatible with DataTables as we discussed before, but do you have any suggestions on how to mimic the effect?

    This link is to the legacy site calendar page that is using a simple HTML table to display the colspan process:

    http://www.process-improvement-institute.com/calendar.html

    as in the line for Course 1, in the section that contains “(only offered as a private course at client site)” spanned across several cells

    This link is the new site under development that has the table being generated by TablePress:


    http://s90778212.onlinehome.us/pii/calendar/

    Just trying to figure out how to develop an alternative so I can still deploy TablePress. Thanks!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    unfortunately, I don’t really have suggestions here, sorry 🙁
    It’s not that TablePress is incompatible here in anyway, the problem is that the DataTables JS library simply does not support tables with combined cells via colspan. There was a recent support ticket for DataTables at https://github.com/DataTables/DataTables/issues/172 that doesn’t leave too much hope here for the future 🙁

    So, the bottom line is: Either use the combined cells (colspan), or use the DataTables features. Both at the same time are not possible at this time, unfortunately 🙁

    Regards,
    Tobias

    Thread Starter jmarkj

    (@jmarkj)

    OK thanks Tobias, I appreciate the feedback!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem! You are very welcome!
    Sorry that I couldn’t really help…

    Best wishes,
    Tobias

    David Sarver

    (@davidsarver)

    jmarkj, The colspan issue was brought up at my site when an administrator had a table with a header that spanned all three rows and the table broke the javascript dependent navigation.

    I’ve found an example of how spanning might be used when working with DataTables which you might find helpful. http://www.datatables.net/release-datatables/examples/basic_init/complex_header.html

    David Sarver

    (@davidsarver)

    Yep, sorry. I should’ve looked at your table before replying; that demo does not apply to your issue.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi David,

    thanks for sharing this information! Yes this solution could be helpful for combined cells in a table head row, but as it requires two table head rows, this won’t directly work in TablePress, as TablePress only supports one head row.
    This is however helpful if one can add the head row with other ways, like custom JavaScript code.

    Best wishes,
    Tobias

    Thread Starter jmarkj

    (@jmarkj)

    I may have come up with a solution pending the client’s approval. the only thing I really needed DataTables for was pagination (so the head row would always be in view), so I turned off DataTables, deployed colspan on the rows where I needed it, and then just used custom CSS to mimic the header row in multiple row instances down the page (every 5 courses). We’ll see how the client feels. The current development page is at:

    http://s90778212.onlinehome.us/pii/calendar/

    And if the production page ends up the same way, I’ll post that URL here at that time, to benefit any others experiencing this issue. Thanks Tobias and David!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, that also looks like a nice solution for your problem! 🙂

    Best wishes,
    Tobias

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘DataTables/colspan issue’ is closed to new replies.