Building up on the solution proposed by Belisarius in "Manipulate custom Tabular".
Consider the following Function to create custom Tabular representation :
DataSampleXX[data_, linesNumber_, columnsList_, color1_, color2_, color3_] := Grid[ Join[ {columnsList}, {Map[Rotate[Text[#], 90 Degree] &, data[[1, columnsList]]]}, data[[2 ;; linesNumber, columnsList]]], Background -> {{{{color1, color2}}, {1 -> color3}}}, Dividers -> {All, {1 -> True, 2 -> True, 3 -> True, 0 -> True}}, ItemSize -> {1 -> Automatic, Automatic}, Alignment -> Top, Frame -> True, FrameStyle -> Thickness[2], ItemStyle -> {Automatic, Automatic, {{1, 1}, {1, Length[data]}} -> Directive[FontSize -> 15, Black, Bold]} ];
And the following data :
soData = {{"col1", "col2", "col3", "col4", "col5", "col6", "col7", "col8", "col9", "col10"}, Range[1, 10], Range[11, 20], Range[21, 30], Range[31, 40]} With[ {columnsList = {1, 3}, data = soData, linesNumber = 3, color1 = LightBlue, color2 = LightRed, color3 = LightGray}, DataSampleXX[data, linesNumber, columnsList, color1, color2, color3]]
I would like to integrate the following Dynamic to feed the
columnsList
argument of theDataSampleXX
Function.Manipulate[Sort@Join[Sequence @@ {a, b}], Evaluate[Sequence @@ MapThread[{{#1, {}, ""}, #2, ControlType -> TogglerBar} &, {{a, b}, Partition[Rule @@@ Transpose[{Range[10], soData[[1]]}], 5]}]], ControlPlacement -> Top]
- This should enable me to dynamically choose the columns (VS a range of column in my previous question) to display using
DataSampleXX
but I yet can`t figure out how to merge the 2 mechanisms.