Selecting just-added record is not setting value in Select control

3 posts, 0 answers
  1. Bilal
    Bilal avatar
    109 posts
    Member since:
    Oct 2014

    Posted 10 Feb 2015 Link to this post

    Hi,
    In this example: http://dojo.telerik.com/OcifE/63

    Click on "Add Row", fill in details, then click on "Add Product". 
    Then, select the newly added product from the list, the editing form is not showing. With some debugging, the selectedProduct is not being set for newly created objects.

    Any idea why?

    Best regards
    Bilal Haidar

  2. Bilal
    Bilal avatar
    109 posts
    Member since:
    Oct 2014

    Posted 10 Feb 2015 in reply to Bilal Link to this post

    I figured out the problem. Since the item added has no ProductID value set, then it won't be treated as a Model object and hence won't be shown.

    Any analysis why the behaviour is like that?

    Regards
    Bilal 
  3. Kendo UI is VS 2017 Ready
  4. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 12 Feb 2015 Link to this post

    Hello Bilal,

    The problem is not that there is no id but that the id and the dropdownlist value are equal to an empty string which is interpreted as no value. Setting ProductID to 0 when adding the item should resolve the problem.

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