Undergraduate grades DO matter, especially the grades that were received after you received admission to dental school (typically the final semester).
Program directors MAY use these grades as a telling sign of your commitment to education and continuing education. After all, what incentive is there for you to keep your grades high after you have already been accepted to dental school?
Granted that undergraduate grades are not an end-all factor, they can, do, and will come into play in one form or another.