He was elected to represent Sutherland in Parliament as a Liberal in March 1840. In July 1846 he was appointed Solicitor General for England and Wales. At the time, it was the normal practice that accepting ministerial office caused a by-election; he was re-elected on 28 July.
In February 1846, he was knighted, a traditional perquisite of the office, but he resigned the position in March 1848 due to ill-health and returned to the backbenches. In May 1849, he was appointed Judge Advocate General, again re-elected in a by-election on 5 June, and made a member of the Privy Council on 29 June.
In 1851, he was elected a Fellow of the Royal Society of Edinburgh his proposer being John Cockburn, the wine merchant who founded Cockburns of Leith.[2]
In 1852, he commissioned the architect William Burn to completely remodel the mansion at Dunira and lived there until the late 1860s.[3]
In retirement he lived and worked in his chambers at the Inner Temple; among other work, he served as a Trustee of the British Museum. His retirement from politics was not permanent; when Stafford was elevated to the House of Lords in March 1861 on becoming the third Duke of Sutherland, Dundas returned to Parliament. He stood down again in May 1867, being succeeded by Lord Ronald Sutherland-Leveson-Gower, the Duke's younger brother.
He died on 30 March 1877.
Family
He married twice: firstly on 29 November 1841 to Catherine Whyte-Melville (d. 23 April 1856), sister of writer George John Whyte-Melville; secondly in 1858 to Lady Lucy Anne Pelham (1815–1901), daughter of Thomas Pelham, 2nd Earl of Chichester. Lucy was a gifted amateur artist.
He had seven children by his first marriage:
Georgina Catherine Dundas (1843–1859)
Robert Dundas (1844–1865), who died unmarried
David Pelham Dundas (1845–1856), who died in childhood
Oliver & Boyd's new Edinburgh almanac and national repository for the year 1850. Oliver & Boyd, Edinburgh, 1850
Gordon Goodwin, "Dundas, Sir David (1799–1877)", rev. H. C. G. Matthew, Oxford Dictionary of National Biography, Oxford University Press, 2004 accessed 11 July 2006