Question: I am using Grails and I am currently faced with this problem.

This is the result of my html table
![enter image description here](https://i.stack.imgur.com/QBAZY.png)

And this is my code from the gsp page

```
    <tr>
        <th>Device ID</th>
        <th>Device Type</th>
        <th>Status</th>
        <th>Customer</th>   
    </tr>
<tr>
<g:each in = "${reqid}">
        <td>${it.device_id}</td>
</g:each>

<g:each in ="${custname}">
        <td>${it.type}</td>
        <td>${it.system_status}</td>
        <td>${it.username}</td>
</g:each>
    </tr>

```

So the problem is, how do I format the table such that the "LHCT271 , 2 , Thomasyeo " will be shifted down accordingly? I've tried to add the `<tr>` tags here and there but it doesn't work.. any help please?

Answer: 
I think you problem is not in the view, but in the controller (or maybe even the domain). You must have some way of knowing that `reqid` and `custname` are related if they are in the same table. You must use that to construct an object that can be easily used in a g:each

You are looking for a way to mix columns and rows, and still get a nice table. I'm afraid that is not possible.

**Edit**

(Sorry, I just saw the last comment.)

You cannot mix two items in a g:each.

Furthermore, if the two things are not related you probably must not put them in the same table. There will be no way for you or for Grails, to know how to properly organize the information
Do you want to display the first reqid against the first custname (three fields), the second againts the second and so on? And are those collections of same length?

In such case you could try the following:

```
<tr>
    <th>Device ID</th>
    <th>Device Type</th>
    <th>Status</th>
    <th>Customer</th>   
</tr>
<g:each var="req" in="${reqid}" status="i">
    <tr>
        <td>${req}</td>
        <td>${custname[i].type}</td>
        <td>${custname[i].system_status}</td>
        <td>${custname[i].username}</td>
    </tr>
</g:each>

```