This is a migrated thread and some comments may be shown as answers.

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

1 Answer 241 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
NHJ asked on 14 Jan 2020, 08:50 AM

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?

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 16 Jan 2020, 07:29 AM

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.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question