CAF - Cascading dropdowns in a table


I have to display two dropdowns in a table where the possible values of the second depend on the selection in the first dropdown.

Usually I use content providers and option groups to provide the possible values of dropdown but here each row of the table might have a different set of possible values. I do not see a solution for that.

Any suggestions are highly appreciated.