To compute the gradient of $f(r)$ you need to compute the partial derivatives. How to do it?
Use the chain rule: $f(r)$ stands for $f[(x^2+y^2)^{1/2}]$ since $r=(x^2+y^2)^{1/2}$, therefore
$$
\begin{align}
\frac{\partial}{\partial x} f(r) & = \frac{\partial}{\partial x} f[(x^2+y^2)^{1/2}] \\
& = \frac{d}{dr} f (r) \cdot \frac{\partial}{\partial x} (x^2+y^2)^{1/2} \\
& = f'(r) \cdot \frac{x}{(x^2+y^2)^{1/2}}.
\end{align}
$$
Likewise you obtain
$$\frac{\partial}{\partial y} f(r) = f'(r) \cdot \frac{y}{(x^2+y^2)^{1/2}}.$$
Notice that
$$\operatorname{grad}r = \left( \frac{x}{(x^2+y^2)^{1/2}}, \frac{y}{(x^2+y^2)^{1/2}} \right),$$
therefore
$$\operatorname{grad} f(r) = f'(r) \left( \frac{x}{(x^2+y^2)^{1/2}}, \frac{y}{(x^2+y^2)^{1/2}} \right) = f'(r) \cdot \operatorname{grad} r.$$