Hide widget, and refresh table after clicking different table cell

Hide widget, and refresh table after clicking different table cell

  
I have a table and inside it the amount of documents for each row will be showed.

When a cell of that table will be clicked, a webblock (that included another table with information about the documents) will become vissible under the table. When clicking on another cell the table will refresh itself.

Any advice, samples, or tuturials on how to do this?
Hi Davey,
Why don't you display the table this way?

And let the number be a weblink to an action. When you click a cell you can pass the id of the row to the action. In the action you can retrieve the information of the documents by using the passed parameter. And display the information below (by AJAX) bij refreshing the webblock. Maybe it is possible to retrieve the clicked cell as well, if so, you can stick to the initial table layout.
Regards,
Bert