Grid layout not scaled with screen resolution

I have one canvas and canvas have a child panel which is actually scroll view panel contains another child which has component grid layout. Canvas’s UI scale mode is scale with screen size.
But my Grid layout not fit to screen width, height is perfect.

50183-grid.png

In case of dynamically updated content, use:

myItem.transform.SetParent(grid.transform, false);

The second argument (worldPositionStays) will probably fix your issue…

Otherwise think about using LayoutElement (Redirect to... title of new-page) for your items.

Canvas’s UI scale mode should be scale with screen size
try to change the resolution to have the better result

add the stretch mode to resize with screen size

195262-screenshot-2022-04-20-110408.png