Problem with getting/setting selected values

2 posts, 1 answers
  1. Trinet
    Trinet avatar
    7 posts
    Member since:
    May 2012

    Posted 28 Nov 2013 Link to this post

    Method value() returns an array reference of selected values which is not a desirable behaviour. Method value() should return cloned array instead.

    If I get selected values by calling method value() into variable eg. selectedValues and then later set those selected values by calling value(selectedValues) the control is empty, because kendoMultiSelect is modifying the same array object. I need to clone those array which i think should be done in kendoMultiSelect.value() method.

    Please see working example on

    Best regards

    Luka Robnik
  2. Answer
    Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 02 Dec 2013 Link to this post

    Hello Luka,

    In general, Kendo widgets return the original instance and the one can decide whether to use it directly or to clone it. In the case of the MultiSelect widget the value can be easily cloned using the slice() method. Check the updated jsBin demo.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top