Combobox virtualization

3 posts, 0 answers
  1. Mahmut
    Mahmut avatar
    21 posts
    Member since:
    Nov 2010

    Posted 27 Feb Link to this post

    Hello,

    I'm experiencing a problem with valuemapper:

    var ds = {   pageSize: 20, 

                      transport: {

                                 read: function (options) {

                                    options.success(aLocalArrayWithGuidPrimaryKey);
                                }
                            }
                        };

    $("#id").kendoComboBox({
                                ...
                                virtual: {
                                    itemHeight: 26,
                                    valueMapper: function(options) {
                                        options.success([options.value || 0]);// "Cannot read property '...' of undefined" error at this line
                                    }
                                },
                                height: 200,
                                ...
                                dataSource: ds
                            })

    I can't find any local data virtualization sample with Guid primary key.

    Any recommendation?

    Thank you very much.

    Mahmut

     

  2. Mahmut
    Mahmut avatar
    21 posts
    Member since:
    Nov 2010

    Posted 29 Feb Link to this post

    Sorry for inadequate information,
    This problem occurs when I use the valuemapper in a kendo-grid cell editor.
    (2015 Q3 version)
    Thanks...
    Mahmut
  3. Kendo UI is VS 2017 Ready
  4. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 02 Mar Link to this post

    Hello Mahmut,

    The valueMapper is a function that should return the indexes of the items that were requested by the widget, but not available in the dataSource. In your case you are returning. In your case you need to provide the valid IDs in the response which I don't believe is the case. Please check the following documentation that would help you:

    http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#configuration-valueMapper

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top