I am creating a list of requirements in a table in which the first column should be an enumeration, such that each requirement is identified by a unique number. Some requirements also have sub requirements, so I need nested enumeration.
An example:
+-----+-----------------------------+
| ID | Requirement |
+-----+-----------------------------+
| 1 | Requirement a |
| 2 | Requirement b |
| 2.1 | Some requirement of b |
| 2.2 | Some other requirement of b |
| 3 | Another requirement |
+-----+-----------------------------+
The only solution I could come up with was the following (obviously not working, even without nesting):
\begin{tabularx}{\textwidth}{|X|X|}
\begin{enumerate}
\hline
\item & Requirement a \\ \hline
\item & Requirement b \\ \hline
\end{enumerate}
\end{tabularx}
Since this example without nesting doesn't work, I assume that a similar example with nesting wouldn't work as well. Other approaches for adding enumeration to a tabular which I found on SE such as this one don't extend to nested enumerations as well.
How can I achieve such an enumeration?
How can I achieve such a thing?

etoolboxpackage for\AtBeginEnvironment. Also, if you use\refstepcounterinstead of\addtocounteryou use\labels and then\refto refer to them. It's also probably better to use\therowItemCountand\thesubRowItemCount(redefined as needed) rather than hard coding the numbering in the item commands. – Alan Munn May 27 '13 at 20:12