"When you try to sort the column again row C and D should stay together at the top or bottom, but they don't"
No, no they shouldn't look into the code of the tablesorter.js code, it's storing the values/ text of the <td>'s value right there in the client on the wiring up of the plugin, and it doesn't handle changing of the values/text you'll have to come up with some other solution, or dig real deep into the code and make changes to fit your need