• Binary
    September 10, 2019 at 2:55 am #5550

    Hello again!

    I’m not able to set the visibility of a checkbox (15. element of a table) to read only.

    I tried by setting it like this:

    
    tw.local.tabellenSpaltenDarstellung = [];
    for (var i=0; i<15; i++) {
    tw.local.tabellenSpaltenDarstellung[i] = {};
    tw.local.tabellenSpaltenDarstellung[i].renderAs = "V";
    tw.local.tabellenSpaltenDarstellung[i].visibility = "R";
    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[15] = {};
    tw.local.tabellenSpaltenDarstellung[15].renderAs = "V";
    tw.local.tabellenSpaltenDarstellung[15].visibility = "R";
    tw.local.tabellenSpaltenDarstellung[15].sortable = false;
    tw.local.tabellenSpaltenDarstellung[15].options = "";
    tw.local.tabellenSpaltenDarstellung[15].css = "";
    tw.local.tabellenSpaltenDarstellung[15].width = "";
    tw.local.tabellenSpaltenDarstellung[15].label = "";
    tw.local.tabellenSpaltenDarstellung[15].showLabel = false;
    tw.local.tabellenSpaltenDarstellung[16] = {};
    tw.local.tabellenSpaltenDarstellung[16].renderAs = "V";
    tw.local.tabellenSpaltenDarstellung[16].visibility = "N";
    tw.local.tabellenSpaltenDarstellung[16].sortable = false;
    tw.local.tabellenSpaltenDarstellung[16].options = "";
    tw.local.tabellenSpaltenDarstellung[16].css = "";
    tw.local.tabellenSpaltenDarstellung[16].width = "";
    tw.local.tabellenSpaltenDarstellung[16].label = "";
    tw.local.tabellenSpaltenDarstellung[16].showLabel = false;
    

    If I set this attribute to “N” tw.local.tabellenSpaltenDarstellung[15].visibility = “R”; it will work.

    Then I tried to set the visibility over a variable and set the String to “R”, “Read only”, “ReadOnly” and tried the same with all letters in capital.
    None of them worked 🙁

    Kind regards,
    Binary

    • This topic was modified 3 years, 6 months ago by Binary.
    SPARK Support
    September 10, 2019 at 7:58 am #5552

    Hi Binary,

    You might need to check your column index or other issue with the code.  This is working for me:

    i = 5;
    autoObject[i] = {};
    autoObject[i].renderAs = “V”;
    autoObject[i].visibility = “R”;
    autoObject[i].sortable = false;
    autoObject[i].options = “”;
    autoObject[i].css = “”;
    autoObject[i].width = “”;
    autoObject[i].label = “”;
    autoObject[i].showLabel = false;

    Unfortunately, the screen clipping tool does not capture the mouse state, but you can see the checkbox is grayed out.

    Regards,

    Stephen P.

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

You must be logged in to reply to this topic.

Start typing and press Enter to search