\rowcolors not working with \multirow

A possible solution is by using the \cellcolor command inside the cell that you want to have a different color. Note that this is not the cell containing the \multirow command but the one above it that you need to place the command in.

\documentclass{report}
\usepackage[table]{xcolor}
\usepackage{multirow}

\definecolor{slg}{gray}{0.95}
\begin{document}

\rowcolors{1}{white}{slg}

Fixed:\\
\begin{tabular}{c|c|c|c}
    A & B & C & D \\
    \cellcolor{white} & foo & bar & 42 \\
    \multirow{-2}{*}{Hello!} & fooo & baar & 13 \\
\end{tabular}
\end{document}

enter image description here

Tags:

Pdftex

Tables