Hi,
I read quite a few times through the documentation and also checked the samples - I did not find any way to get the checked state of the list items. Also changing the check-state seems not to get reflected in the model...
If I understand correctly, the checkboxes should behave as "selected" - so a checked item would mean that the item is also selected...
Here is what I did:
<!-- HTML -->
<li><input id="dropdown1" ej-dropdownlist [dataSource]="filter" [fields]="filtersvalues" [showCheckbox]="true" [value]="flt_flags" (change)="onChange($event)"/></li>
{{filter[0].selected}}
{{filter[1].selected}}
{{filter[2].selected}}
And the typescript side:
filter: Array<Object> = [];
filtersvalues: Object;
constructor() {
this.filter = [
{text: 'check 1', value: '1', selected: false },
{text: 'check 2', value: '2', selected: false },
{text: 'check 4', value: '4', selected: false }
];
this.filtersvalues = { dataSource: this.filter, text: 'text', value: 'value', selected: 'selected' };
Could you please help here or provide a sample?
Thanks!