Looking at your code it looks like TableName+ColumnName would be your unique ID so when you render your link (probably the column_name column) you would want the link to call some javascript that saves the item they clicked on to a hidden field (stuff TABLE_NAME+"~"+COLUMN_NAME into a hidden field) then refresh the page.
When your page refreshes, check to see if the hidden field has a value. If so, make a function call to retrieve the detail data associated with that record and render it after the parent item (the record they clicked on) is rendered.
If the click the link a second time, clear out the hidden field if it's value matches the item that was clicked on and refresh.
HTH