Grid with locked areas?

How can I make my grid with locked areas. Like you need to do something before they unlock. Just the locking mechanism where you can't place something on the locked part.
Thanks
Thanks