1 Kings 15:5

Because David had done that which was right in the eyes of the LORD and had not turned aside from any thing that he had commanded him all the days of his life, except in the matter of Uriah, the Hittite.

1 Kings 14:8

and rent the kingdom away from the house of David and gave it thee, and yet thou hast not been as my slave David, who kept my commandments and who followed me with all his heart, to doing only that which was right in my eyes,

2 Samuel 11:15-17

And he wrote in the letter, saying, Set Uriah in the forefront of the hottest battle and retire from him, that he may be smitten and die.

2 Samuel 12:9-10

Why, therefore, hast thou despised the commandment of the LORD, to do evil in his sight? Thou hast killed Uriah, the Hittite, with the sword and hast taken his wife to be thy wife and hast slain him with the sword of the sons of Ammon.

1 Kings 9:4

And if thou wilt walk before me as David, thy father walked, in integrity of heart and in uprightness, to do according to all that I have commanded thee, keeping my statutes and my rights,

Luke 1:6

And they were both righteous before God, walking in all the commandments and ordinances of the Lord, blameless.

2 Samuel 11:3-4

And David sent and enquired after the woman. And one said, Is not this Bathsheba, the daughter of Eliam, the wife of Uriah, the Hittite?

1 Kings 15:3

And he walked in all the sins of his father, which he had done before him; and his heart was not perfect with the LORD his God, as the heart of David his father.

2 Kings 22:2

And he did that which was right in the sight of the LORD and walked in all the way of David, his father, and did not turn aside to the right hand or to the left.

2 Chronicles 34:2

And he did that which was right in the sight of the LORD and walked in the ways of David, his father, and declined neither to the right hand, nor to the left.

Psalm 51:1

Have mercy upon me, O God, according to thy mercy; according unto the multitude of thy compassion eradicate my rebellion.

Psalm 119:6

Then I shall not be ashamed, when I have insight unto all thy commandments.

Acts 13:22

And when he had removed him, he raised up unto them David to be their king, to whom also he gave testimony, saying, I have found David, the son of Jesse, a man after my own heart, who shall fulfil all my will.

Acts 13:36

For David, after he had served his own generation by the will of God, fell asleep and was gathered unto his fathers and saw corruption;

Treasury of Scripture Knowledge

Summary

Because David did that which was right in the eyes of the LORD, and turned not aside from any thing that he commanded him all the days of his life, save only in the matter of Uriah the Hittite.

Bible References

David

1 Kings 15:3
And he walked in all the sins of his father, which he had done before him; and his heart was not perfect with the LORD his God, as the heart of David his father.
1 Kings 14:8
and rent the kingdom away from the house of David and gave it thee, and yet thou hast not been as my slave David, who kept my commandments and who followed me with all his heart, to doing only that which was right in my eyes,
2 Kings 22:2
And he did that which was right in the sight of the LORD and walked in all the way of David, his father, and did not turn aside to the right hand or to the left.
2 Chronicles 34:2
And he did that which was right in the sight of the LORD and walked in the ways of David, his father, and declined neither to the right hand, nor to the left.
Psalm 119:6
Then I shall not be ashamed, when I have insight unto all thy commandments.
Luke 1:6
And they were both righteous before God, walking in all the commandments and ordinances of the Lord, blameless.
Acts 13:22
And when he had removed him, he raised up unto them David to be their king, to whom also he gave testimony, saying, I have found David, the son of Jesse, a man after my own heart, who shall fulfil all my will.