We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to bind a selected item in a drop-down list to a text box and edit it?

Platform: JavaScript - EJ 2 |
Control: DropDownList

You can bind a selected value from the drop-down list using the ngModel and edit it inside the text box or numeric input box. The selected item text and value can be got using the change event of the drop-down list through the args.itemData. To bind this itemData text to the text box and edit the selected text, refer to the following code.








import { NgModule } from '@angular/core';

import { BrowserModule } from '@angular/platform-browser';

import { FormsModule } from '@angular/forms';

import { DropDownListModule} from '@syncfusion/ej2-ng-dropdowns';

import { AppComponent } from './app.component';

import { HelloComponent } from './hello.component';



    imports:      [ BrowserModule, FormsModule ,DropDownListModule],

    declarations: [ AppComponent, HelloComponent ],

    bootstrap:    [ AppComponent ]


export class AppModule { }


StackBlitz sample link: https://stackblitz.com/edit/angular-svhivj


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile