Combobox and calculated fields

5 posts, 1 answers
  1. Dennis
    Dennis avatar
    24 posts
    Member since:
    Oct 2012

    Posted 05 Mar 2013 Link to this post

    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.
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 07 Mar 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Dennis
    Dennis avatar
    24 posts
    Member since:
    Oct 2012

    Posted 07 Mar 2013 Link to this post

    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.
  5. Answer
    Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 11 Mar 2013 Link to this post

    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!
  6. Dennis
    Dennis avatar
    24 posts
    Member since:
    Oct 2012

    Posted 11 Mar 2013 Link to this post

    Thank you. Your answer works for me. On a side note, it would be nice if the parse function was better documented.
Back to Top
Kendo UI is VS 2017 Ready