Hello,
I ran into an issue using the multicolumncombobox. I want to fill this dropdown with data rertrieved from my Rest API Java backend. Although the data shows up, I get an error in my console looking like this:
core.mjs:8453 ERROR Error: Provided data must consist only of objects. See https://www.telerik.com/kendo-angular-ui/components/dropdowns/multicolumncombobox/data-binding/
at MultiColumnComboBoxComponent.verifySettings (progress-kendo-angular-dropdowns.mjs:9690:19)
at MultiColumnComboBoxComponent.ngAfterContentChecked (progress-kendo-angular-dropdowns.mjs:4400:14)
...
Here's my template code:
<kendo-multicolumncombobox
#list
[data]="list"
[listHeight]="300"
textField="name"
valueField="customerid"
>
<kendo-combobox-column field="name" title="name" [width]="200">
</kendo-combobox-column>
<kendo-combobox-column field="customerid" title="ID" [width]="200">
</kendo-combobox-column>
My component:
list: Customer[]=[];
...
constructor(private api:CustomerService){
this.api.getAllCustomer(this.params).subscribe((resp) => {
this.list = resp;
tap(()=>this.loading = false)
});
}
CustomerService:
public getAllCustomer(params: any): Observable<Customer[]> {
params.pldId='23';
return this.api.getAllCustomer(params);
}
The backend an retrieving the data from the backend works fine. However, the multicolumncombobox doen't really like my Array.
If I replace the list with the data from the example, it does work without an error (thats the prodictsliste from https://www.telerik.com/kendo-angular-ui/components/dropdowns/multicolumncombobox/). MAybe noteworthy, that my backend produces response of "application/son".
Any help is greatly appreciated!
Cheers,
Joerg