Nested Repeat and Layouts

Hi Everyone.
Wonder if someone can help.
We are wanting in our admin panel to list users and their respective roles.
We have two tables, users and one permissions, and works brilliant.
Using our query and a repeat we get the following:


What I am trying to get is something like this ideally i had hoped in a generated table ( cant get that to work).

Basically want to have table we can quickly search for members, role etc and amend, update etc.
We want this to be added similarly to existing table and search or a newly designed one.

Anyone able assist as been driving me nuts trying to do this over last couple of days.

Thanks