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

kendoDropDownList on the Grid displaying null after Save

1 Answer 383 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Raj asked on 28 Aug 2017, 07:37 PM

After I select an item from Dropdownlist and hit save, Grid is not displaying the description corresponding to the Id value returned from the service.

Here is the code snippet...

            dataSource: dataSource,
            pageable: false,
            columns: [
                    field: "TransferTypeId",
                    title: "Transfer Type",
                    template: "#:TransferType#",
                    width: 150,
                    editor: function (container, options) {
                        $('<input data-bind="value:' + options.field + '" required/>')
                                 autoBind: true,
                                 dataTextField: "Value",
                                 dataValueField: "Key",
                                 valuePrimitive: true,
                                 dataSource: {
                                     transport: {
                                         read: {
                                             url: THIS_APP_PATH + "Api/Lookup/TransferType"
                }] });

         What am I missing here?

         Appreciated for your help.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 30 Aug 2017, 08:06 AM
Hello Raj,

Based on the provided information I can assume that the issue occurs because the TransferTypeId.Value has to be set inside the template.

In general, when a DropDown is used its value is originally a complex object and the template should reference the property of that object that has to be displayed.

This can be observed in our demo example:

{ field: "Category", title: "Category", width: "180px", editor: categoryDropDownEditor, template: "#=Category.CategoryName#" },

I hope this is helpful.

Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question