Iain Hume's 11th-minute strike and a bizarre own goal from Jay McEveley three minutes after the break saw North End make it nine league games unbeaten with their fifth win in a row.
Dany N'Guessan's curling effort from the edge of the area, with four minutes remaining, gave Swindon hope of a comeback but Preston hung on, much to the delight of Grayson.
"For 75 minutes I thought we were very good; we dominated the game with and without the ball, which is very pleasing," he said.
"The one good thing is that the players carried out the instructions we gave them because Swindon are a very good side and the players knew how hard they had to work.
"When we played we looked very good, and although the players got a little bit tired towards the end you could perhaps forgive them given what they'd done in the previous 75 minutes. It's a very good win against a very good team.
"We limited them to few opportunities and it's certainly high up there in terms of performances this season so far.
"I'd like to give our players a lot of credit for making them panic because Swindon have got a lot of good players who are comfortable on the ball. I'm delighted with the result and it keeps our unbeaten run going."
- Sports & Recreation