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

Custom editing - binding dropdownlist to a grid cell

3 Answers 195 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shabtai
Top achievements
Rank 1
Shabtai asked on 01 May 2013, 10:58 PM
Hi

I'm trying to reproduce the custom editing sample with dropdownlist inside the gridcell.
For some reason, the combo is not created...

I'm attaching the project to this message.

Do I miss any script for the project?

Thank you in advance,
Shabtai

3 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 03 May 2013, 12:35 PM
Hi,

After reviewing the provided project it seems that the issue comes from missing editor template for the "ClientEmployeeViewModel" model. The template must be included in the following location:

  • Views/Shared/EditorTemplates/ClientEmployee.cshtml :
    @(Html.Kendo().DropDownList()
            .Name("Employee")
            .DataValueField("EmployeeID")
            .DataTextField("EmployeeName")
            .BindTo((System.Collections.IEnumerable)ViewData["employees"])
    )
      
For convenience I updated the provided project with the above change and attached it to the current thread. 

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shabtai
Top achievements
Rank 1
answered on 01 Aug 2013, 10:04 AM
 Thank you!

BTW, when I'm adding  kendo.core.min.js    to the project, it gives incorrect functionality displaying 'undefined' when losing focus from the DDL, either when changing value. See attached picture.
0
Accepted
Vladimir Iliev
Telerik team
answered on 01 Aug 2013, 12:28 PM
Hi Shabtai,

In current configuration when the "kendo.web.min.js" scripts is included adding the "kendo.core.min.js" file would be invalid configuration as it's already included in the previous file. Adding duplicated scripts to the project can lead to unexpected behavior.

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Shabtai
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Shabtai
Top achievements
Rank 1
Share this question
or