How can I get position of a child inside a parent containing GridLayout Group component?

I want to get position of Bear objects. They’re objects with Recttransform and Image component.
However, position and localPosition return the same value, anchoredPositions return zero. Why?

var Bear:GameObject = this.gameObject.transform.GetChild(0); // its bear 1
var Bear:GameObject = this.gameObject.transform.GetChild(2); // its bear 2

Read More

Create the Bear then make them a child of the container then set their localPosition to (0,0,0). You may also have to reset their scale to (1,1,1).

The following method has worked for me:

GameObject Bear = Instantiate(BearObject);
Bear.transform.SetParent(parentcontainer.transform);
Bear.transform.localScale = new Vector3(1,1,1);
Bear.transform.localPosition = new Vector3(0,0,0);

Hi there I posted a workaround for this problem in this link:

http://answers.unity3d.com/answers/1200809/view.html