batyamit
12 Mar 2012, 12:47 AM
I'm using
CheckBoxListView
ListStore<BaseModel> store = new ListStore<BaseModel>();
for (String value : values){
BaseModel item = new BaseModel();
item.set("label", value);
store.add(item);
}
checkList = new CheckBoxListView<BaseModel>();
checkList.setStore(store);
checkList.setSize(200, 100);
checkList.setDisplayProperty("label");
for (int i=0 ; i < store.getCount() ; i++){
checkList.setChecked(store.getAt(i), true);
}
but no model is being displayed
on previous discussion (http://www.sencha.com/forum/showthread.php?88818-CheckBoxListView-setChecked-method-produce-no-effect)on the forum, they suggested to setChecked after the commpenet is shown, but it isn't possible in my case.
is there any other solution?
is there a method to automatically set all the models in the store as checked?
CheckBoxListView
ListStore<BaseModel> store = new ListStore<BaseModel>();
for (String value : values){
BaseModel item = new BaseModel();
item.set("label", value);
store.add(item);
}
checkList = new CheckBoxListView<BaseModel>();
checkList.setStore(store);
checkList.setSize(200, 100);
checkList.setDisplayProperty("label");
for (int i=0 ; i < store.getCount() ; i++){
checkList.setChecked(store.getAt(i), true);
}
but no model is being displayed
on previous discussion (http://www.sencha.com/forum/showthread.php?88818-CheckBoxListView-setChecked-method-produce-no-effect)on the forum, they suggested to setChecked after the commpenet is shown, but it isn't possible in my case.
is there any other solution?
is there a method to automatically set all the models in the store as checked?