@coderus, Thanks. I had tried something similar but that did not work either. Apparently you can only anchor to a parent or a sibling. myGrid is a siblibg, myGrid.rect1 is not.
QML Notification: Cannot anchor to an item that isn't a parent or sibling.