I am working on table in which the last column is wrapped with a command \Addbreakable. I need to color alternate rows as well. But I can do either \Addbrekable or coloring alternate rows.
Note:
- This is a follow up to How to wrap text in a table when there are no spaces at which to break the line?
Below is my sample example.
\documentclass{article}
\usepackage{graphicx}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage[margin=1.2cm]{geometry}
\usepackage{framed}
\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage{hyphenat}
\usepackage{xstring}
\usepackage{forloop}
\usepackage{collcell}
\usepackage[table]{xcolor}
\definecolor{Gray}{gray}{0.9}
\definecolor{LightCyan}{rgb}{0.88,1,1}
\newsavebox\MyBreakChar%
\sbox\MyBreakChar{}% char to display the break after non char
\newsavebox\MySpaceBreakChar%
\sbox\MySpaceBreakChar{-}% char to display the break after space
\makeatletter%
\newcommand*{\BreakableChar}[1][\MyBreakChar]{%
\leavevmode%
\prw@zbreak%
\discretionary{\usebox#1}{}{}%
\prw@zbreak%
}%
\newcounter{index}%
\newcommand{\AddBreakableChars}[1]{%
\StrLen{#1 }[\stringLength]%
\forloop[1]{index}{1}{\value{index}<\stringLength}{%
\StrChar{#1}{\value{index}}[\currentLetter]%
\IfStrEq{\currentLetter}{]}
{\currentLetter\BreakableChar[\MyBreakChar]}%
{\currentLetter}%
}%
}%
\begin{document}
\textbf{Manual Solution:}
\newline
\begin{mdframed}[roundcorner=10pt,leftmargin=1, rightmargin=1, linecolor=yellow,outerlinewidth=.5, innerleftmargin=8, innertopmargin=8,innerbottommargin=8, everyline = true]
%\begin{tabular}{>{\rule{0pt}{.5cm}}>{\arraybackslash}p{8cm}c|> {\arraybackslash}p{1cm}c|>{\arraybackslash}p{1cm}c|>{\arraybackslash}p{1cm}c|>{\arraybackslash}p{2cm}c}
\rowcolors{2}{gray!25}{white}
\begin{tabular}{p{2cm}p{2cm}p{6cm}p{2cm}p{2cm}}
\rowcolor{yellow}
Col1 & Col2 & Col3 & Col4 & Col5\
test & data & data & data &\AddBreakableChars{[1][7][3][8][5][9][7][8][9][89][100]}\
test & data & data & data &\AddBreakableChars{[1][7][3][8][5][9][7][8][9][89][100]}\
\end{tabular}
\end{mdframed}
\vspace{1mm}
\begin{mdframed}[roundcorner=10pt,leftmargin=1.0, rightmargin=1.0, linecolor=red,outerlinewidth=.5, innerleftmargin=8, innertopmargin=8,innerbottommargin=8]
\centering
\rowcolors{2}{green}{white}
\begin{tabular}{>{\rule{0pt}{.5cm}}>{\arraybackslash}p{2.25 cm}>{\arraybackslash}p{2.25cm}c>{\arraybackslash}p{8cm}c>{\arraybackslash}p{2cm}c}
\rowcolor{yellow} \textbf{Col1} &\textbf{Col2} &\textbf{Col3} &\textbf{Col4} &\textbf{Col5}\
\hline
ERBB3 & TT2292239& TQWT & Grammar. a grammatical unit of one or more words that expresses an independent statement, question, request, command, exclamation, etc. & \AddBreakableChars{[1][2][3][4][5][6][7][8][9][10][11][12][13][14]}
\
& TT2296336& CQWG & Grammar. a grammatical unit of one or more words that expresses an independent statement, question, request, command, exclamation, etc. & \AddBreakableChars{[1][2][3][4][5][6][7][8][9][10][11][12][13][14]}
\
\end{tabular}
\end{mdframed}
\end{document}
Please help me out of this problem. I have tried many methods but nothing seems to be working fine.

graphicxpackage required? Ismdframedrequired to reproduce the problem? Also your example does not compile:\rowcolorsis undefined. – Peter Grill Jun 29 '12 at 02:33\usepackage[table]{xcolor}up to the top. If the problem can be reproduced without a package, that package should be removed in the MWE. – Peter Grill Jun 29 '12 at 02:46