You can travel from Tirupati to Kodaikanal either through car or by train. The fastest way to reach Kodaikanal is to take Indica from Tirupati to Melmaruvathur then take Pearl City Exp from Melmaruv (Read More)athur to Kodaikanal which takes a total of 11 hours approx.
There is a direct train from Tirupati from Kodaikanal which takes 15 hours to reach.
Bangalore - Salem - Dindigul - Kodai Road - Kodaikanal route is pretty good, except for a few rough patches here and there. You can go for it. It will take you about 7.5-8 hours