Ganda was succeeded by his son Vidyadhar. After having conquered Trilochanapala, Mahmud attacked Vidyadhar. There is a lot of controversy among the Muslim historians regarding the battle between Mahmud and Vidyadhar. According to Athir, after fighting the whole day, Hindu army fled away and eventually hid itself in the forest. In the morning Mahmud found the battlefield empty. He searched the soldiers and killed many of them and also made some of them prisoners but Vidyadhar escaped. This description shows the battle could not be finally decided and after plundering and causing destruction, ultimately Mahmud returned to Gazni. According to Nizamuddin, Mahmud was confused to see the big army of Vidyadhar and prayed god in the night. As a result of this, Vidyadhar became afraid and fled away from the battlefield. sometimes historian calls Vidyadhar with the name of Nanda. Gandiuzi and Frishta also ascribe to his view. But this is significantly shows the result of the prayer to god and the influence of Islam. Thus there is doubt about the conquest of Mahmud. According to Cunningham "He was doubtful of the result and like a prudent general, he went back to gazni to return with a large force."
Three years after Mahmud again attacked Vidyadhar but could not conquer the fort of Kalanjar, and both of them entered into a treaty and both the parties presented gifts to each other.
Thus it can be seen that Vidyadhar was the only Indian king who faced Mahmud with bravery and diplomacy and never submitted to him.
Other conquests: Vidyadhar had also conquered many other Indian kings and compelled them to accept his suzerainty. An inscription states that the Malva king Bhojadeva and Kalachuri king Gangeyadeva worshipped Vidyadhar in the same way as student worships his guru or teacher. This indicates both these kings were defeated by Vidyadhar.