# Uniform Grid Panel setup

**URL:** <https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 1, 2017, 2:46pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025 "2017-04-01T14:46:34Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![juh825](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/juh825/32/547749_2.png) [@juh825](https://forums.unrealengine.com/u/juh825)\
**Post date:** [February 23, 2023, 11:25pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/21 "2023-02-23T23:25:33Z")

</div>

Also interested in the above. I’m trying to make an automap for a grid-based game, and some help with populating this grid with returns from ray traces, for instance, would be immensely appreciated.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [March 24, 2024, 12:05am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/22 "2024-03-24T00:05:30Z")

</div>

> [@Everynone](#):
>
> ![graph.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/7/a72330e99ff0f72b1fd4eccd2ae7123be9617c45.jpeg)
> 
> graph.jpg2313×591 165 KB

Hi, how do you make sense of the percentage? I can’t figure it out.  
How does 4%x1 translate to: “I want this in column 1”, for example?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 24, 2024, 6:55am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/23 "2024-03-24T06:55:15Z")

</div>

It’s not percentage, it’s modulo.

---

<div class="post-metadata">

**Author:** ![kcinkcinkcinnick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kcinkcinkcinnick](https://forums.unrealengine.com/u/kcinkcinkcinnick)\
**Post date:** [November 17, 2024, 8:22pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/24 "2024-11-17T20:22:55Z")

</div>

Hi,

How would you go about updating a UniformGrid list?

I have a UniformGrid that contains 32 ‘InventorySlots’. (Children)

When the Player picks something up, the inventory array is updated, and a delegate triggers a “refreshInventoryGrid” function.

My current refreshInventory solution is to delete all children of the UnifformGrid and start iterating over the Inventory array to Create Inventory slots with the inventory Item data. Then adding these slots to the correct Row/Column.  
When there are no more Item’s in the inventory array, I keep creating empty InventorySlots until I reach 32 inventorySlots.

This means that for every pickup / drop of an item 32 widgets are being deleted and then 32 new widgets are made, which doesn’t seem performant.

I could also start with 32 empty InventorySlots, then iterate over the Inventory Items and update the InventorySlots ItemData. But then I will have to cast for each inventory item… And that every time the inventory Array is altered.

- UPanelWidget\* SlotWidet = UniformGrid.GetChildAt( GetNextFreeSlotIndex() );
- **Cast this panelWidget to InventorySlot widget**
- InventorySlotWidget-\>AddItemData( InventoryItem); (This will pass the item data to the inventory slot)

The problem here is the complexity of finding the InventorySlot that need to be deleted / altered + the cost of the Cast to InventorySlot.

TL;DR.  
Is it best to update a UniformGridPanel by deleting all children, create 32 new widgets and fill them in the correct location in the UniformGridPanel  
or  
Create 32 widgets at the beginning of the game and for every Inventory update, pass the new ItemData to the correct widgets. (BUT for every item in the inventory a cast will be needed)

---

<div class="post-metadata">

**Author:** ![Joanx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Joanx](https://forums.unrealengine.com/u/Joanx)\
**Post date:** [November 11, 2025, 12:39pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/25 "2025-11-11T12:39:23Z")

</div>

Hello! I am working on a UnifromGridPanel but got a little stuck. I want to make it so that when I click a button it gives me the number inside as a reply. But I cannot get the text information, only the last number that the set text gets (30). Any ideas?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/6/a/e6a4b18078f842ad3cfa07d2ad3f35b07dd75a85.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/f/e1f863c035c14f64c44417e4de42f0e8367f94f2.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 13, 2025, 9:19am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/26 "2025-11-13T09:19:19Z")

</div>

Make each button a user widget instead and dispatch its custom data.

* * *

Essentially, instead of constructing buttons + text, you would instantiate a custom widget that already has those two (or more) and some text. Note the example the thread above does exactly that, but you’d also need to add a dispatcher.

[Previous page](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025.md?page=1)
