Reputation: 21
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
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