23 Best Kendo UI Angular 2 DropDownList Actions [How To]

Set Default Value DropDownList Using Kendo Angular 2 [How To]

“How to define a default Item as a primitive value”? and “How to define a default Item as an object value”?

The “Kendo UI Angular 2 DropDownList” is a form component and used binds the data list and chooses a single predefined value as per you from a dropdown list.

The DropDownList default Item property type must be match to the data type. In other word, if the DropDownList data property contains a list of objects, the default Item will need to be defined as an object with the same as text-field and value-field.

Stayed Informed – Live demo Plunker                                          

Example as,

  selector: 'my-app',
  template: `
        [defaultItem]="'Chose item...'"
class AppComponent {
    public listItems: Array<string> = ["10001-Item 1", "10002-Item 2", "10003-Item 3","10001-Item 4"];


I hope you are enjoying with this post! Please share with you friends. Thank you!!

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions