This is a migrated thread and some comments may be shown as answers.

Combobox virtualization

2 Answers 158 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mahmut
Top achievements
Rank 2
Mahmut asked on 27 Feb 2016, 09:09 PM

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 Answers, 1 is accepted

Sort by
0
Mahmut
Top achievements
Rank 2
answered on 29 Feb 2016, 09:39 AM
Sorry for inadequate information,
This problem occurs when I use the valuemapper in a kendo-grid cell editor.
(2015 Q3 version)
Thanks...
Mahmut
0
Kiril Nikolov
Telerik team
answered on 02 Mar 2016, 09:08 AM
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!
 
Tags
ComboBox
Asked by
Mahmut
Top achievements
Rank 2
Answers by
Mahmut
Top achievements
Rank 2
Kiril Nikolov
Telerik team
Share this question
or