This question is related to the following
Interactively select a row/column of a Grid
I’d like to present information in a grid where in the user can choose from the entries in the table. As shown in the figure:
Here’s some sample code:
tableHeaders = {"A", "B", "C", "D"};
data = Table[10 i + j, {i, 3}, {j, 3}];
checkBoxes = Table[Checkbox[True], {i, 3}];
table = Transpose@Insert[Transpose@data, checkBoxes, 1];
Grid[Insert[table, tableHeaders, 1]
, Alignment -> {Left, Baseline}
, Spacings -> {1.4, 1.3}
, FrameStyle -> LightGray
, Frame -> True
, Background -> {None, {Lighter@Lighter@LightBlue, None}}
, Dividers -> {{True, True}, {True, True}}
]
I tried to get define variables table/checkBoxes as a Dynamic but Mathematica throws up errors.
Question: How do I modify the code so that I can get a list of rows that are checked in the grid.