mercredi 3 janvier 2018

Drop Down Checkbox not selected while Dynamically Data Binded

I need to bind the drop down data dynamically from db and also to select the checkbox Html file

<ss-multiselect-dropdown [options]="GridOptions" [texts]="myTexts" [settings]="mySettings" [(ngModel)]="GridDataModel"> </ss-multiselect-dropdown>

Ts file

GridOptions: IMultiSelectOption[]
GridDataModel : any[];
 ngOnInit() {
  --db service call
GridDataOptions:any[];
 for (let item of DBdatal) {
            var Arr = new Array({ 'id': item.Id, 'name': item.Name });
            GridDataOptions.push(Arr[0]);
        }
GridOptions = GridDataOptions
GridDataModel = [1, 2];

}

the checkbox is not selecting based on GridDataModel value.




Aucun commentaire:

Enregistrer un commentaire