Vandiar dug in for over three hours to score 78 and lead the Dolphins to 210 for nine in their second innings at stumps, a lead of 178 runs over the log-leading Cobras.
The 22-year-old rescued the Dolphins from a parlous top-order collapse in which they lost three wickets in three balls to crash to 22 for three. The rest of the specialist batsmen all failed and it was left to the lower-order of Daryn Smit (24), Kyle Abbott (28) and Calvin Savage (28) to eventually provide Vandiar with some support and ensure the KwaZulu-Natalians did not succumb to a dismal two-day defeat.
The Cobras had also batted wastefully as they resumed on their overnight score of 130 for four, just 44 runs behind the Dolphins’ first-innings total of 174. But the home side lost their last six wickets for just 58 runs as they slid to 206 all out.
Six of the top eight batsmen reached 20, but only opener Alastair Gray (36) scored more than 30.
Abbott, who does look more and more like an international prospect with every outing, was the best of the Dolphins bowlers with four for 51 in 18.1 overs, while impressive youngster Savage supported him well by contributing three wickets.
But the Dolphins were not able to build on their successful morning as Beuran Hendricks trapped Imraan Khan leg-before for 14 at the end of the sixth over and Justin Kemp then had Divan van Wyk (8) and Vaughn van Jaarsveld (0) caught behind the wicket with the first two balls of the seventh over, the last before lunch.
Seamers Johann Louw, Hendricks and Kemp claimed two wickets apiece, but the Cobras were not able to finish off the Dolphins innings before stumps, leaving themselves with the probability of a tricky run-chase on the third day.
The second-placed Warriors would seem to have the upper hand in their match against the Knights in Bloemfontein, thanks to a devastating new-ball burst by Andrew Birch.
The 27-year-old paceman claimed the first four wickets to fall as he reduced the Knights to 22 for four in their second innings, Birch having earlier shared the biggest partnership of the Warriors innings that helped them to 281 all out and a first-innings lead of 13 runs.
The Knights ended the second day on 76 for five, leading by just 63 with only half their wickets intact.
Birch perturbed all the batsmen with his prodigious swing in overcast conditions, with Michael Erlank completing a pair as he edged the first ball of the innings into the slips, where Rilee Rossouw (4) was also caught. Rudi Second (3) was caught behind and Birch then induced a return catch from Ryan Bailey (8).
Obus Pienaar (17) was then trapped leg-before by off-spinner Simon Harmer, but the Warriors were denied any further wickets by Dean Elgar (28*) and Patrick Botha (14*).
The Warriors, resuming their first innings on 79 for two, were rocked by the early loss of the experienced Arno Jacobs for 40 in the fifth over of the day, dismissed by Dillon du Preez.
The Warriors had slipped to 171 for six when debutant Vuyisa Makhapela was out for 35, caught close-in off the bowling of spinner Botha, but the innings was boosted by Harmer’s defiant 50 and his eighth-wicket partnership of 59 with Birch, who scored 27.
Young fast bowler Corne Dry was the most successful of the Knights bowlers with three for 68 in 18 overs.
The match between the Lions and the Titans at the Wanderers was washed out after just two balls were bowled in the morning, the visitors scoring two runs to take their first-innings total to 25 without loss.
The third-placed Lions scored 303 in the first innings and will be desperate for the weather to improve to give them a chance of keeping in touch with the Cobras and Warriors at the top of the log.