Here's how to play all 7 chords in the key of D -- in any position on the fretboard.
Just like the chords in the key of C (post #185) and the key of G (#186), each harmony in this key is formed from the underlying scale of the key. In this case, the D major scale:
And on the guitar, all of these chords follow a predictable (CAGED chord shape) pattern up the fretboard....