The perfect way is here
Apart from grid lines (which in most games you don't want) and separate variables for X and Y grid sizes, how is that functionally any different than what I posted? What makes it worth spending £1.99 for something so simple?
Just in case anyone wants different X and Y grid sizes, e.g. for isometric, then here is the updated version:
Global variable number GridSizeX is 64
Global variable number GridSizeY is 32
Sprite:DragDrop is dragging -> Sprite: Set position to (round(Sprite.X/GridSizeX)*GridSizeX, round(Sprite.Y/GridSizeY)*GridSizeY)