• Binary
    August 27, 2019 at 2:55 am #5531

    Hi all,

    I needed to hide the last column in my table. So I created a TableColumn variable (called tabellenSpaltenDarstellung), passed it from the CV to the Coach and this was the only way which worked:

    tw.local.tabellenSpaltenDarstellung = [];
    for (var i=0; i<11; i++) {
    	tw.local.tabellenSpaltenDarstellung[i] = {};
    	tw.local.tabellenSpaltenDarstellung[i].renderAs = "V";
    	tw.local.tabellenSpaltenDarstellung[i].visibility = "V";
    	tw.local.tabellenSpaltenDarstellung[i].sortable = false;
    	tw.local.tabellenSpaltenDarstellung[i].options = "";
    	tw.local.tabellenSpaltenDarstellung[i].css = "";
    	tw.local.tabellenSpaltenDarstellung[i].width = "";
    	tw.local.tabellenSpaltenDarstellung[i].label = "";
    	tw.local.tabellenSpaltenDarstellung[i].showLabel = false;
    tw.local.tabellenSpaltenDarstellung[12] = {};
    tw.local.tabellenSpaltenDarstellung[12].renderAs = "V";
    tw.local.tabellenSpaltenDarstellung[12].visibility = "N";
    tw.local.tabellenSpaltenDarstellung[12].sortable = false;
    tw.local.tabellenSpaltenDarstellung[12].opt12ons = "";
    tw.local.tabellenSpaltenDarstellung[12].css = "";
    tw.local.tabellenSpaltenDarstellung[12].w12dth = "";
    tw.local.tabellenSpaltenDarstellung[12].label = "";
    tw.local.tabellenSpaltenDarstellung[12].showLabel = false;

    Is there a more efficient way to do it?
    Actually this is only what I want to change from default:

    tw.local.tabellenSpaltenDarstellung[12].visibility = "N";

    Thank you!

    • This topic was modified 3 years, 9 months ago by Binary.
    SPARK Support
    August 27, 2019 at 6:24 am #5534

    Hi Binary,

    It sounds like you are trying to nest a Table control within a custom Coach View, and control the column visibility dynamically. If so, the method you have used is the approach I would take.

    If you were going to permanently hide the column, why not just use the native Columns configuration option?

    The only other option to hide the column would be to develop some CSS to hide the column, and dynamically add and remove a class from the table.


    Stephen P.

    August 27, 2019 at 9:16 am #5535

    Then I did the right approach! Thank you Stephen!

    SPARK Support
    August 27, 2019 at 9:58 am #5536

    You are welcome. Regards, Stephen P.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search