Error after upgrading to latest version

5 posts, 0 answers
  1. Stefano
    Stefano avatar
    3 posts
    Member since:
    Jan 2015

    Posted 18 Jan 2016 Link to this post


    After upgrading to lastest version (2016Q1) the dropdownlists in my application using custimized templates stopped working with the following error: The 'optionLabel' option is not valid due to missing fields.

    my code is similar to:

        optionLabel: "Select ...",
        autoBind: true,
        dataSource: recordDataSource,
        dataTextField: "recordId",
        dataValueField: "recordId",
        filter : "contains",
        template: '#: firstName # #: lastName #',
        valueTemplate: '#: firstName # #: lastName #'

    Datasoruce is made by 3 columns recordId, firstName, lastName

  2. Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 20 Jan 2016 Link to this post

    Hello Stefano,

    I have tested our online demos and everything is working fine. Could you please setup a runnable sample in dojo and send it for a local test. 

    Peter Filipov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Ryan
    Ryan avatar
    9 posts
    Member since:
    Jan 2016

    Posted 25 Jan 2016 in reply to Stefano Link to this post

    We had this issue as well after the new version.  The problem comes with using valueTemplate and optionLabel together in a dropDownList (even though this wasn't the case before the new version)--Kendo tries to render a valueTemplate for optionLabel, which causes the problem.

    I fixed this by passing the necessary attributes to the optionLabel attribute:

    kendoDropDownList: {                
        dataTextField: 'icd9Code',
        dataValueField: 'id',
        optionLabel: {
            id: null,
            icd9Code: app.message('hems.selector.general.none_selected'),
            description: app.message('hems.selector.general.none_selected')
        valueTemplate: '#= data.icd9Code # - #= description #',
        template: '#= data.icd9Code # - #= description #'            

  4. Bob
    Bob avatar
    3 posts
    Member since:
    Feb 2014

    Posted 01 Feb 2016 in reply to Peter Filipov Link to this post

     I'm also getting this error after upgrading Kendo this week. I'm using the Angular directives.  

    <select kendo-drop-down-list
    k-option-label="'Select a Contact'"
    k-template="'#=firstName# #=lastName#'"
    k-value-template="'#=firstName# #=lastName#'"

  5. Bob
    Bob avatar
    3 posts
    Member since:
    Feb 2014

    Posted 02 Feb 2016 in reply to Bob Link to this post

    I was able to resolve my issue by using k-option-label-template  (instead of k-option-label) in cases where I have a value-templates defined
Back to Top