Why does it say that he was king over all of Yisrael?
Rashi: When they saw his Chachmah, all rejoiced over his kingship.
Radak: David initially did not rule over all of Yisrael, so it says that Shlomo [from the beginning] ruled over all of Yisrael. No one questioned his kingship 1 , for they saw Divine Chachmah in him to give the verdict.
Malbim citing Mahari: It said twice previously that he kingship was solidified. This is a third verse, for there were three reasons. (a) His father wanted him to rule, and made him king in his lifetime. (b) He killed his enemies. (c) Hashem gave to him Chachmah and Binah, so all wanted him to be their king.
Malbim: This was unlike Sha'ul - at the beginning of his kingship, Bnei Beliya'al disgraced him.