Title: Default sort column and dynamic cell value modification
Last modified: August 21, 2016

---

# Default sort column and dynamic cell value modification

 *  Resolved [Shahab Yunus](https://wordpress.org/support/users/shahab-yunus/)
 * (@shahab-yunus)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/default-sort-column-and-dynamic-cell-value-modification/)
 * 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/](http://wordpress.org/plugins/tablepress/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Shahab Yunus](https://wordpress.org/support/users/shahab-yunus/)
 * (@shahab-yunus)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/default-sort-column-and-dynamic-cell-value-modification/#post-4127938)
 * Never mind. I figured out both. Thanks.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/default-sort-column-and-dynamic-cell-value-modification/#post-4127983)
 * 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](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  Thread Starter [Shahab Yunus](https://wordpress.org/support/users/shahab-yunus/)
 * (@shahab-yunus)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/default-sort-column-and-dynamic-cell-value-modification/#post-4127991)
 * 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.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/default-sort-column-and-dynamic-cell-value-modification/#post-4127994)
 * Hi,
 * alright, great! Thanks for sharing that!
    Yes, that `aaSorting` command is really
   helpful here!
 * Best wishes,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Default sort column and dynamic cell value modification’ is closed to
new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [default](https://wordpress.org/support/topic-tag/default/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/default-sort-column-and-dynamic-cell-value-modification/#post-4127994)
 * Status: resolved