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

Combobox and calculated fields

4 Answers 104 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 2
Dennis asked on 05 Mar 2013, 04:23 PM
http://jsfiddle.net/Zakpu/y8nfK/

Hello,
check out my fiddle.

I have a combobox bound to an external json datasource. It has fields for product names and manufacturers. I get the dropdown values that combine Manufacturer + Product name via a template. The problem is the text field which is set to name. I can't search the combobox by the manufactuers - it's not gonna list them, just the names. I tried using a calculated field to achive this but it didnt work.

Thanks in advance.

4 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 07 Mar 2013, 09:36 AM
Hello Dennis,

Basically if you create field which is a combination of the other two you have used for the template the filtering should be working over them (if the data-text-field is assigned to it).

Also the fiddle which you shared does not contain any code, could you check and see if you missed to update it? It would definitely help us see what you tried.

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dennis
Top achievements
Rank 2
answered on 07 Mar 2013, 11:46 AM
Ah, sry for the empty fiddle here it is:

http://jsfiddle.net/Zakpu/3NzS5/2/


How do i create the field? I tried doing it by making a function in the model, above the fields like its done in some of the demos, and I tried to create a new field an assaign my function to the defaultValue, which is technique I saw in of the support answers. Neither seem to work for me.
0
Accepted
Petur Subev
Telerik team
answered on 11 Mar 2013, 08:29 AM
Hello Dennis,

Thank you for sharing the fiddle. Basically you can extend your model with that extra field via the schema.parse function.

To demonstrate this I updated your jsfiddle:

http://jsfiddle.net/3NzS5/3/

Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dennis
Top achievements
Rank 2
answered on 11 Mar 2013, 09:39 AM
Thank you. Your answer works for me. On a side note, it would be nice if the parse function was better documented.
Tags
ComboBox
Asked by
Dennis
Top achievements
Rank 2
Answers by
Petur Subev
Telerik team
Dennis
Top achievements
Rank 2
Share this question
or