Announcement

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

    SelectItem with Multiple is not working correctly when used as editor in listgrid

    I'm using SmartGWT 6.0p

    I'm setting multiple option on data source level.

    field = new DataSourceTextField(desc.getName());
    SelectItem editorProperties = new SelectItem();
    editorProperties.setMultiple(true);
    editorProperties.setMultipleAppearance(MultipleAppearance.PICKLIST);
    editorProperties.setValueMap(...);
    field.setEditorProperties(editorProperties);

    Multi select item is working perfectly in Form but when I'm rendering data source with list grid select item have following problem.

    1. When I select multiple values display value is "VAL1, VAL2" (with space in separator).
    2. After I navigate away from row editors display value is changed to "VAL1,VAL2" (without space in separator)
    3. When I open editor again select item is unable to parse value correctly and non of the previously selected values is marked as selected

    It is also not possible to correctly deselect all values because at least one value remains in display value.

    I was trying to change default separator (", ") using setMultipleValueSeparator but this is not solving the problem.

    #2
    Hi mrh174,

    I'm pretty sure you have to call setMultiple() on the DSField itself as well.

    Best regards
    Blama

    Comment


      #3
      Thank you very much for your help. It is working perfectly after adding field.setMultiple(true);

      Comment

      Working...
      X