Posted 6 July 2020, 2:57 pm EST
How to achieve pre-select multiple drop down option through check box in wj-multi-select.
please suggest.
Forums Home / Wijmo / General Discussion
Posted by: ksm.ac.in on 6 July 2020, 2:57 pm EST
Posted 6 July 2020, 2:57 pm EST
How to achieve pre-select multiple drop down option through check box in wj-multi-select.
please suggest.
Posted 7 July 2020, 2:05 am EST
Hi,
To pre-select some items, simply set their checkedMemberPath to true before the MultiSelect is loaded. Please refer to the sample link below for reference:
https://stackblitz.com/edit/ckkyne-vulpnq
Regards,
Ashwin
Posted 7 July 2020, 8:14 am EST
Hello Ashwin,
Can please provide some other examples of pre-select dropdown
Not getting from this above example.
how & where to use this property “checkedMemberPath”
Posted 8 July 2020, 1:38 am EST
Hi,
The checkedMemeberPath property is used to get or set the property which will be bound to the checkbox of MultiSelect. For example, if you have data like:
[{ id: 1, name: 'XYZ', active: true}, ...]
and you have set the checkedMemberPath property to active, then if this item will be checked, then active will become true and vice-versa.
If you have not set the checkedMemberPath property, then the MultiSelect uses $checked as the property by default.
In your case, since you are not aware So, in order to pre-select some items, just set the $checked property to true.
I hope this clears your doubts.
~regards
Posted 15 July 2020, 8:03 am EST
Thanks Ashwin.saxena