All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
What that person told you it is not true; rather, it is an innovation in religion. The deceased rejoices in his grave with his righteous deeds that will come to him in the form of a man with a beautiful face, as in the Hadeeth: “…. And a man with a beautiful face, beautiful garments, and a sweet odor comes to him and says, ‘Rejoice in what pleases you for this is your day which you have been promised.' He asks, ‘Who are you, for your face is perfectly beautiful and brings good tidings?' He replies, ‘I am your good deeds.’…” [Ahmad]
The deceased also benefits from the supplications (for forgiveness) that one supplicates in his favor and giving charity on his behalf, but the prayer in the manner that you mentioned is nothing but an innovation.
Allah Knows best.