user7039263
user7039263

Reputation: 21

How to data bind the store data with checkboxgroup

Json

{
success:true,
data:[{name:'gender',value:'male'},
         {name:'gender',value:'female'},
          {name:'gender',value:'other'}
        ]
}

If I use store how can bind this to checkboxgroup.

Upvotes: 1

Views: 805

Answers (1)

4thfloorstudios
4thfloorstudios

Reputation: 430

You can't directly bind a store to a checkboxgroup as it has no store configuration out of the box.

You need to either set the values by yourself by mapping the store data to the checkboxgroup field for example on the "load" event of the store or you simply send the data in your model to the form as comma separated values (as key-value in your JSON like: "gender":"male,female,others"), the values should then be set automatically.

Upvotes: 1

Related Questions