# RexUI GridTable and custom item containers - not working correclty

**URL:** <https://phaser.discourse.group/t/rexui-gridtable-and-custom-item-containers-not-working-correclty/9875>\
**Category:** Phaser 3\
**Created:** [June 30, 2021, 10:32am UTC](https://phaser.discourse.group/t/rexui-gridtable-and-custom-item-containers-not-working-correclty/9875 "2021-06-30T10:32:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Puccini](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/puccini/32/4984_2.png) [@Puccini](https://phaser.discourse.group/u/Puccini)\
**Post date:** [June 30, 2021, 10:32am UTC](https://phaser.discourse.group/t/rexui-gridtable-and-custom-item-containers-not-working-correclty/9875/1 "2021-06-30T10:32:20Z")

</div>

Hi there,

i’ve tried this example:  
https://codepen.io/rexrainbow/embed/preview/XyJbWX?default-tabs=js%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=XyJbWX

i dont want to use the RexUI label (or other rexUi containers), but my custom containers.  
So i just return my “Container” elemente for each cell, but this seems to break all the behavior of the gridtable…

Look at this example:  
[https://jsfiddle.net/ragesoft/7jgcyfd0](https://jsfiddle.net/ragesoft/7jgcyfd0)

How can i manage to use my custom containers (or if needed, where do i need to place them to be correclty handled? Inside some other rexUI container??)

Thx a lot!  
Greetings!

---

<div class="post-metadata">

**Author:** ![Puccini](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/puccini/32/4984_2.png) [@Puccini](https://phaser.discourse.group/u/Puccini)\
**Post date:** [July 2, 2021, 6:44am UTC](https://phaser.discourse.group/t/rexui-gridtable-and-custom-item-containers-not-working-correclty/9875/2 "2021-07-02T06:44:52Z")

</div>

I dont know why, but i’ve managed to get it working.

This is the working code:  
[https://jsfiddle.net/ragesoft/98ekd1ju/](https://jsfiddle.net/ragesoft/98ekd1ju/)

Only change i’ve made:  
Instead of creating my container inside the “Items” function (with “this” as scene), i create it in the “createCellContainerCallback” with “cell.scene”.

But shouldn’t be “this” and “cell.scene” be the same in there respective context?

🙂

---

<div class="post-metadata">

**Author:** ![Milton](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Milton](https://phaser.discourse.group/u/Milton)\
**Post date:** [July 2, 2021, 7:35am UTC](https://phaser.discourse.group/t/rexui-gridtable-and-custom-item-containers-not-working-correclty/9875/3 "2021-07-02T07:35:58Z")

</div>

> [@Puccini](#):
>
> But shouldn’t be “this” and “cell.scene” be the same in there respective context?

They are 🙂  
But the Button will have different offsets depending on creating before/during createCellContainerCallback. I guess the scene has changed by then…
