Drag and Drop items to grid.

Hey Everyone

I am designing a circuit based game and have been wondering how I would achieve this. I want to be able to drag components from a list/menu and place them on a grid (see image attached). Also once attached to the grid it would be nice to be able to grab and move the object as well. Anyone got any ideas on a way to achieve this effect?