MVVM not working with DropDownList when typeof data value is boolean

2 posts, 0 answers
  1. Wenhao
    Wenhao avatar
    17 posts
    Member since:
    Jan 2012

    Posted 03 Apr 2013 Link to this post

    Hello Kendo,

    I just used the following test code with kendo DropDownList mvvm as to your demo:

        $(function() {
              var vm = kendo.observable({
                dropdownlistSource: [
                  { text: 'True', value: true },
                  { text: 'False', value: false }
                selected: null

              vm.selected = vm.dropdownlistSource[1];
          kendo.bind($('body'), vm);
          <input data-role="dropdownlist" data-text-field="text" data-value-field="value" data-bind="source: dropdownlistSource, value: selected" />

    However, the widget just display the first item every time, not the value demonstrated in data-bind attr. When i switch the value field of data source to interger 1 and 0, that works perfect.

    I think this would be a bug in your control, and please pay attention to it when u r free.

  2. Holger
    Holger avatar
    78 posts
    Member since:
    Nov 2012

    Posted 03 Apr 2013 Link to this post


    I experienced a similar problem.
    For a possible solution please refer to the following thread: DropDownList as custom editor in grid

Back to Top