Adding a KendoUI drop-down to a custom edit template

2 posts, 0 answers
  1. bberdel
    bberdel avatar
    20 posts
    Member since:
    Jun 2006

    Posted 06 Jun 2016 Link to this post

    I have a field in my Scheduler's dataSource schema that's referenced in a resource to provide custom colors to the Schedule events.  The resource gets the color definitions dynamically.   When the "editable" and "edit" properties are commented out in my example, the scheduler uses the standard edit popup, and the drop-down is populated correctly (see standardEdit.png).  When the properties are uncommented, the scheduler uses my custom definition, but the contents of the drop-down display incorrectly (see customEdit.png).  How do I define a custom template so the drop-down diaplays the same as in the standard template?


  2. Vladimir Iliev
    Vladimir Iliev avatar
    2190 posts

    Posted 08 Jun 2016 Link to this post

    Hello Brian,

    You can try setting the "dataValueField" and "dataTextField" options of the DropDownList which tells the widget which fields from the passed data should look for the text and the value. Please check the example below:

    <select id="parkName" data-bind="value:parkName" data-role="dropdownlist"  data-text-field="text" data-value-field="value" data-value-primitive="true">

    Vladimir Iliev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top