ComboBox in ListView Inline Edit

2 posts, 0 answers
  1. Joshua
    Joshua avatar
    67 posts
    Member since:
    May 2012

    Posted 06 Sep 2012 Link to this post

    I am having several problems that I just cannot figure out. I would like to use a combobox or an autocomplete as part of my edit template. I cannot use a static list and i need to search because i could have thousands of results. 

    I have been trying to get these routine tasks to work for several days now and I am having no luck.This has to be a scenario that lots of people use. There is a simple lookup where i need to get the resultant id and attach it to a record and i dont care about the text, just the id.  
    If there were more complete examples out there I would assume I can figure this out, but there isn't and I cannot. Please help.

    I have included a fiddle that displays all of the problems that I am seeing when I try to edit a ListView inline.

    1. When you edit an item it updates the data-value-field with the data-text-value. In the jsFiddle you will see the SkillID is overwritten with the Skill Name.
    2. When you edit and then click the drop down, it selects the first item in the list and not actual value that is already present.
    3. If you click edit on one row and then click edit on another row, the list view will go out of edit mode, but then the buttons will not work and it never goes back into edit mode.
    4. The save event still fires even if the required field is not filled out and it does not pass validation. It does not move my data back to my original object, so i have to copy it. i would assume i do it here.
    5. How would this work with an autocomplete? I can only seem to get the text field to show and it always displays the id by default.
  2. Nikolay Rusev
    Nikolay Rusev avatar
    2287 posts

    Posted 10 Sep 2012 Link to this post

    Hello Joshua,

    Hello Joshua,

    First you will have to define model for the ListView DataSource, as this is required for editing.

    Next in order to update both fields SkillID and SkillName you will have to handle change of the ComboBox widget and manually update the model fields.

    For more details please refer to the updated jsfiddle:

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