Question T12573
Visible to All Users

choicesEnableIf not working at dropdown column in dynamicmatrix

created 2 years ago (modified 2 years ago)
JSON
{ "name": "Geral", "elements": [ { "type": "panel", "name": "panel3", "elements": [ { "type": "matrixdynamic", "name": "av", "title": { "pt": "EXCEPÇÃO ANTIVÍRUS" }, "description": "Não são permitidas excepções a root folders como por exemplo: c:\\ d:\\ … c:\\windows\\ c:\\program files\\", "titleLocation": "top", "columns": [ { "name": "hostname", "title": { "pt": "Hostname" }, "cellType": "dropdown", "isRequired": true, "renderAs": "select2", "choicesByUrl": { "url": "https://stg-portal-datacenter.corporativo.pt/api/public/request/host_av", "path": "values", "valueName": "value", "titleName": "value" } }, { "name": "action", "title": { "pt": "Acção" }, "cellType": "dropdown", "isRequired": true, "renderAs": "select2", "choices": [ { "value": "add", "text": { "pt": "Adicionar" } }, { "value": "remove", "text": { "pt": "Remover" } } ], "choicesEnableIf": "{item} contains 'add'" } }

I think the functionality is simple and straightforward so that I can disable / enable an option in a dropdown control which in turn is a column of a dynamic matrix. But in my attached code where is the choicesEnableIf attribute; I want the "remove" option in the dropdown to be readonly, that is, not to be selectable when the dropdown is opened.

Thanks in advance

Best regards,

Luis Monteiro Silva

Comments (1)

    Hi Luis,
    Thank you for sharing this sample. The remove option is actually read-only and cannot be selected:
    2023-03-31_19-35-46.gif

    Would you please elaborate on the required behavior?