Posted 6 July 2020, 5:57 am 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, 5:57 am EST
Posted 6 July 2020, 5:57 am EST
How to achieve pre-select multiple drop down option through check box in wj-multi-select.
please suggest.
Posted 6 July 2020, 5:05 pm 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 6 July 2020, 11:14 pm 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 7 July 2020, 4:38 pm 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 14 July 2020, 11:03 pm EST
Thanks Ashwin.saxena