Problem with getting/setting selected values

2 posts, 1 answers
  1. Licence
    Licence avatar
    5 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 

    http://jsbin.com/eYUwUqA/1/edit

    Best regards

    Luka Robnik
  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 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.

    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top