Ideal would be to take Raptisagar express till Chennai, but unfortunately connecting train to Kodaikanal leaves bit early and you may have to stay there overnight and catch a day train to Dindigul/Kodaikanal road. From Kodaikanal road, its around 80 kms to Kodaikanal by road.
Alternatively, you can even think of continuing your journey till coimbatore in raptisagar express and take a road journey to Kodaikanal from there.
Other option is to take GKP-SBC trains and change from Bangalore to Kodaikanal road trains.