# How to make it so that on each scroll the cells are simply updated, and not new ones are drawn?

**URL:** <https://forums.unrealengine.com/t/how-to-make-it-so-that-on-each-scroll-the-cells-are-simply-updated-and-not-new-ones-are-drawn/484042>\
**Category:** UI\
**Tags:** scrollbox, inventory-system, unreal-engine, Performance, grid, Widget, question\
**Created:** [May 28, 2021, 9:47am UTC](https://forums.unrealengine.com/t/how-to-make-it-so-that-on-each-scroll-the-cells-are-simply-updated-and-not-new-ones-are-drawn/484042 "2021-05-28T09:47:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shedels](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shedels/32/1121823_2.png) [@Shedels](https://forums.unrealengine.com/u/Shedels)\
**Post date:** [May 28, 2021, 9:47am UTC](https://forums.unrealengine.com/t/how-to-make-it-so-that-on-each-scroll-the-cells-are-simply-updated-and-not-new-ones-are-drawn/484042/1 "2021-05-28T09:47:10Z")

</div>

Question.  
I have a GridPanel nested within a ScrollBox. There are several widgets, but the point is that the inventory has cells and it can be scrolled up.

A maximum of 30 cells are displayed, but the total number is unlimited, at least 1kk.

How to make it so that on each scroll the cells are simply updated, and not new ones are drawn?

---

<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:** [May 28, 2021, 10:16am UTC](https://forums.unrealengine.com/t/how-to-make-it-so-that-on-each-scroll-the-cells-are-simply-updated-and-not-new-ones-are-drawn/484042/2 "2021-05-28T10:16:04Z")

</div>

> How to make it so that on each scroll  
> the cells are simply updated, and not  
> new ones are drawn?

I didn’t get that bit. ☹

> but the total number is unlimited, at  
> least 1kk.

You will hit a performance brick wall & face a bloated memory footprint with those numbers using a Grid Panel. You will need a Tile View instead. Here’s a neat example of how a List View (same idea but not tiled) works:

> [@Creating a combat log in Blueprint](https://forums.unrealengine.com/t/creating-a-combat-log-in-blueprint/150005/10):
>
> No problem, if you want to experiment with the List View instead: create an Object class blueprint in the content browser with an exposed text variable - it will be used to store data in the list view, called Entry Data below. once you have it, you can do this in the wLogLine’s class settings: The Implemented Interfaces bit on the left is the critical part here! It allows you to pull the data from a list view object and assign it to the widget’s variable. Th…

You only draw / show what the user can see (plus some margin). So if the container can show 30 items at a time but you have 10k elements, only a fraction of those will be kept and managed in the memory and other bits are generated dynamically on-the-fly as needed.

* * *

If you decide to stick with the Grid solution, here’s how you can dynamically add and distribute elements a grid:

> [@Uniform Grid Panel setup](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/2):
>
> Welcome to the forums. If you want a widget to have a specific size, you can place it on a canvas; in addition, this will allow you to control its position (amongst other things). Here is an example of a \*UniformGrid \*sitting on the canvas (inside a border to make it pretty). The grid widget: When you add children to a \*UniformGrid \*you’ll need to specify which column & row they occupy. If you add children manually, you can set it up in the details panel of every child (as default…

The forums update messed up some images, but the critical bit shows up.

---

<div class="post-metadata">

**Author:** ![Shedels](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shedels/32/1121823_2.png) [@Shedels](https://forums.unrealengine.com/u/Shedels)\
**Post date:** [June 2, 2021, 7:11am UTC](https://forums.unrealengine.com/t/how-to-make-it-so-that-on-each-scroll-the-cells-are-simply-updated-and-not-new-ones-are-drawn/484042/3 "2021-06-02T07:11:13Z")

</div>

I can’t decide if it’s a good idea to use TileView for inventory or not? Some people say it is for other things.

For example, how would you organize the UI in an MMO game?

I’m not crazy, it’s just that mmo rpg windows and inventory are very close to my idea.
