The sorting will function properly if you set the same id for e:dataTd as the variable from dataModel.
This is a requirement for sorting.
Another change that I have made was that I set dynamically rendered on tab level. Please look into the attached files to see the solution.