How to get the text and value of a dropdown list in a selected row?

2 posts, 0 answers
  1. NHJ
    NHJ avatar
    59 posts
    Member since:
    Nov 2019

    Posted 14 Jan Link to this post


    I'm using a custom dropdown list using <Input ...>.

    So a drop down list exists for every row in the grid.

    When I click on a row here I want to get all the information of that row.

    But there is something wrong with the value returned by the dropdown list.

    1. Data that has already been saved in DB and not modified is imported correctly.

    2. If you use incell to change the dropdown, "textField" gets the correct value, but "valueField" still points to the previous value.

    For example:

    textfield: name
    valuefield: id

    {id: 1, name: 'apple'},
    {id: 2, name: 'orange'}

    If the data stored in DB is {id: 1, name: apple}, "1, apple" is imported when row is clicked.

    After this I change the dropdown to orange and don't save it yet.

    "1, orange"
    Get the data called

    That is, the valuefield has not been updated, only the textfield has been updated.

    Can you imagine what went wrong?

    Or do you need code?
  2. Martin
    Martin avatar
    240 posts

    Posted 16 Jan Link to this post

    Hello Nam,

    Unfortunately the provided information is not enough for me to reproduce the issue. Could you please try to modify this Dojo example to demonstrate the problematic behavior? I will then test it locally and happily assist you.

    I am looking forward to your reply.

    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