WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Default sort column and dynamic cell value modification (5 posts)

  1. Shahab Yunus
    Member
    Posted 11 months ago #

    Hello,

    I have two queries.

    1- Is there a way to specify default sort order on based on any column that is executed whenever data is updated in the table or when the table is rendered everytime?

    2- Is there a way to dynamically change value or content of the cells in table based on the value that the cell original had at the time of loading? What I am trying to say here is that while the table is being rendered, can we implement some hook to change value of cells which have not-null data, as an example.

    I am presuming that this might be able to be done through some DataTable trickery?

    Any help or guidance would be appreciated. Thanks.

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

  2. Shahab Yunus
    Member
    Posted 11 months ago #

    Never mind. I figured out both. Thanks.

  3. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    thanks for your question! Great to hear that you already found the solution! :-)
    Would you mind sharing your solution? Maybe it's helpful for other people as well. Thanks!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

  4. Shahab Yunus
    Member
    Posted 11 months ago #

    Sure.

    For the first, I added custom parameter to the 'initialize call' for the DataTable on which my table was based on:

    "aaSorting": [[ 11, "desc" ]]

    For the second, jQuery to the rescue. I wrote custom code to do that. How and where you hook that code (js) depends on the theme, plugin you are using or the extent of customization you have done to your site.

  5. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    alright, great! Thanks for sharing that!
    Yes, that aaSorting command is really helpful here!

    Best wishes,
    Tobias

Reply

You must log in to post.

About this Plugin

About this Topic