Error when attempting to read data of MultiSelect

2 posts, 0 answers
  1. Jessica
    Jessica avatar
    5 posts
    Member since:
    Mar 2018

    Posted 12 Jun 2019 Link to this post

    So we recently updated our version of kendo to 2015.2.805.

    The error ("Uncaught TypeError: Cannot read property 'value' of undefined") is caused by line 3 of the following JavaScript ("multiselect" on line 1 is undefined):

    1.var multiselect = $("#Statuses").data("kendoMultiSelect");
    2.var selectedData = [];
    3.var items = multiselect.value();


    Initialization code:

    3.    .Name("Statuses")
    4.    .Placeholder("Select statuses...")
    5.    .BindTo(Model.AllStates)
    6.    .ItemTemplate("<span class=\"workflow-state #:getStateClass(data.Value)#\">#:data.Text#</span>")
    7.    .TagTemplate("<span class=\"workflow-state #:getStateClass(data.Value)#\">#:data.Text#</span>")
    8.    .Value(Model.SelectedStatuses))

    When testing this code on a previous version of the application, the feature works. However, since that version we have updated kendo, as well as the references to kendo (in _Layout.cshtml).

    Could this maybe be a reference issue?

    Regardless of whether we add or remove kendo.web.min.js, the problem persists.

    We are referencing the following files, all of these files return an OK result:

  2. Veselin Tsvetanov
    Veselin Tsvetanov avatar
    1164 posts

    Posted 14 Jun 2019 Link to this post

    Hello Jessica,

    I have answered to your questions in the support thread that you have opened on the same topic. Should you have any further questions, I would suggest you to continue communication there.

    Veselin Tsvetanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top