longtableprovides\\*which can prevent the pagebreak,and.longtableredefines\hlineto support this function- Then,
multirowenhances\clineto support that function.
One can use package option "longtable" to load the enhancement, seetexdoc multirow, sec. 3.6. - It seems that
\hhlinefromhhlinepackage does not work with\\*.
Is there a way to make hhline work with \\*? Maybe this answer can be a start point, but I am not sure.
\documentclass{article}
\usepackage{array}
\usepackage{longtable}
\usepackage[longtable]{multirow}
\usepackage{hhline}
\usepackage[table]{xcolor}
\textheight4\baselineskip
\pdfpageheight5\textheight
\begin{document}
\begin{longtable}{*{3}{|l}|}
\hline
A & B & C \\ \hline
A & B & C \\ \hline
A & B & C \\* \cline{2-3}
A & \cellcolor{pink}B & C \\* \cline{2-3}
A & B & C \\ \hline
\end{longtable}
\newpage
\begin{longtable}{*{3}{|l}|}
\hline
A & B & C \\ \hline
A & B & C \\ \hline
A & B & C \\* \hhline{|~|-|-|}
A & \cellcolor{pink}B & C \\* \hhline{|~|-|-|}
A & B & C \\ \hline
\end{longtable}
\end{document}
I need to use \cellcolor inside a longtable hence \hhline seems to be a must, by texdoc colortbl, sec. 10.


\\*does not prevent page breaks at a following `\hline – David Carlisle Jul 29 '19 at 21:21multirowactually make\clineworking with\\*, as stated in its package doc? – muzimuzhi Z Jul 30 '19 at 00:57