Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Disabling specific items in a select list

    Greetings,

    Is there a way to disable specific items in a pulldown select list? Say for example, having China listed, but not selectable? I'm unable to find a way to do it.
    Thanks

    Code:
    isc.DynamicForm.create({
        width: 500,ID:"myForm",
        fields: [{
            name: "shipTo", title: "Ship to", type: "select",
            valueMap: {
                "US" : "<b>United States</b>",
                "CH" : "China",
                "SP" : "Spain"
            },
            imageURLPrefix:"flags/16/",
            imageURLSuffix:".png",
            valueIcons: {
                "US" : "US",
                "CH" : "CH",
                "SP" : "SP"
            }
        }]
    });

    #2
    If you use an optionDataSource, each option is delivered as a ListGridRecord. Therefore you can disable an option by having disabled:true as an attribute of the record.

    If this is just a small set of statically defined options, use a clientOnly optionDataSource.

    Comment


      #3
      That worked perfectly, thanks! Although it turned out to be enabled:false rather than disabled:true.

      Comment

      Working...
      X