Announcement

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

  • Multiple selection in the listgrid saves with brackets ([])

    Hi, I am using SmartClient V11.0 Enterprise Edition build 2016-12-25

    I have tested multiple = true in the listGrid and I found the values selected are stored(saved in the database) with brackets. And when I try select again, the selections do not applied again(not checked).
    Furthermore, everytime I click the field and press enter key, the bracket keeps adding like [[[[Asia,Europe]]]]

    Here is example "ListGrid> Editing > data validation" I have simulated.
    -----------------------------------------------------------------------------------------
    isc.ListGrid.create({
    ID: "countryList",
    width:550, height:224, alternateRecordStyles:true,
    dataSource: countryDS,
    fields:[
    {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false},
    {name:"countryName"},
    {name:"continent", multiple:true}, // <------------------------------------------------------ put multiple:true
    {name:"member_g8"},
    {name:"population",
    validators:[
    {type:"integerRange", min:1}
    ]
    },
    {name:"independence"}
    ],
    autoFetchData: true,
    canEdit: true,
    editEvent: "click"
    })




  • #2
    See dataSourceField.multipleStorage.

    Comment


    • #3
      Also, a further note: your test case is invalid because you've put multiple:true on a widget when the DataSource field continues to not be declared multiple. The grid correctly attempts to store an Array, and the server correctly flattens this into a string because that's how the field is declared, hence your result.

      Comment


      • #4
        I really appreciate your help. I fixed as below,

        In ds, I added
        <field name="companies" type="ntext" multiple="true" multipleStorage="json"></field>

        ofcause in Listgrid definiation, I have multiple:true

        It works fantastic!!!. thanks,

        Comment

        Working...
        X