DropDownList and form initialValue

3 posts, 1 answers
  1. John
    John avatar
    12 posts
    Member since:
    May 2019

    Posted 23 Mar Link to this post

    Kendo's Form element has an initialValue prop which I can assign an object to. Inputs will use their "name" field to bind to the initialValue object however I am having trouble getting this to work with DropDownLists. 

    Do DropDownLists work with a form's initial value if indeed the props (data, dataItemKey, textField, and name) are all set. The value of the binded field should match the dataItemKey's field.

     

    Thanks

  2. John
    John avatar
    12 posts
    Member since:
    May 2019

    Posted 23 Mar in reply to John Link to this post

    Ok I figured it out....

    Basically the the initalValues' value for the given dropdownlist must match the objects in the data prop of the DropDownList exactly. I would have hoped that the dataItemKey would have been used when matching the initialValue for selection. Is this working as intended? How it works currently is severely limiting and makes using this component cumbersome.

     

    See what I mean here:

    https://stackblitz.com/edit/react-99es75-h6w5lm?file=app%2Fmain.jsx

     

     

  3. Answer
    Stefan
    Admin
    Stefan avatar
    3070 posts

    Posted 24 Mar Link to this post

    Hello, John,

    I can suggest checking the following forum post on a similar subject where we have provided an example and more details about the case:

    https://www.telerik.com/forums/combobox-binding-to-dataset-of-object

    Please let me know if you have additional questions on this matter.

    Regards,
    Stefan
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top