Injecting data to a dropdown that uses remote data

1 Answer 28 Views
DropDownList
Scott
Top achievements
Rank 1
Scott asked on 17 May 2021, 01:29 PM

How do you inject additional data to a drop down that uses remote data?

I would like to end up with a ProductID=0 and ProductName="Select Choice" as the first option.

 

https://dojo.telerik.com/ebitOseJ
  $(document).ready(function() {
                    $("#products").kendoDropDownList({
                        dataTextField: "ProductName",
                        dataValueField: "ProductID",
                        dataSource: {
                            transport: {
                                read: {
                                    dataType: "jsonp",
                                    url: "https://demos.telerik.com/kendo-ui/service/Products",
                                }
                            }
                        }
                    });
                });

1 Answer, 1 is accepted

Sort by
0
Accepted
Neli
Telerik team
answered on 20 May 2021, 12:13 PM

Hello Scott,

As far as I understand you need to add new items to a DropDownList that is bound using remote data. If this is the case I would suggest you take a look at our 'Add new Item' Demo where such implementation is demonstrated. 

- https://demos.telerik.com/kendo-ui/dropdownlist/addnewitem

You could click on the 'View source' tab in order to check the implementation. 

Let me know in case you have additional questions on the matter.

Regards,
Neli
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
DropDownList
Asked by
Scott
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or