Let $T=biggl(begin{matrix} A&0 U&B end{matrix}biggr)$ be a formal triangular matrix ring, where $A$ and $B$ are rings and $U$ is a $(B, A)$-bimodule. We prove that: (1) If $U_A$ and $_B U$ have finite flat dimensions, then a left $T$-module $biggl(begin{matrix} M_1 M_2end{matrix}biggr)_{varphi^M}$ is Ding projective if and only if $M_1$ and $M_2/{rm im}(varphi^M)$ are Ding projective and the morphism $varphi^M$ is a monomorphism. (2) If $T$ is a right coherent ring, $_{B}U$ has finite flat dimension, $U_{A}$ is finitely presented and has finite projective or $FP$-injective dimension, then a right $T$-module $(W_{1}, W_{2})_{varphi_{W}}$ is Ding injective if and only if $W_{1}$ and $ker(widetilde{{varphi_{W}}})$ are Ding injective and the morphism $widetilde{{varphi_{W}}}$ is an epimorphism. As a consequence, we describe Ding projective and Ding injective dimensions of a $T$-module.