Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Prepopulate the selected igx-combo control value in a reactive form


I'm looking at your Angular sample for igx-combo using reactive forms:  Is there a way to set a default selected value in the igx-combo controls in the reactive form?   For example in your sample, I'd like to use this form to buy new movie tickets and edit existing movie tickets.  When editing you'd need to prepopulate the already selected value of combo box as well as the date picker.



  • 270
    Verified Answer
    Offline posted

    This can been resolved:

        public ds = ["Comedy"];

        public user: FormGroup;

        constructor(fb: FormBuilder) {

            this.user ={

                date:  new FormControl( new Date("2018-08-27")),

                dateTime: [""],

                email: ["", Validators.required],

                fullName: new FormControl("", Validators.required),

                genres: new FormControl(this.ds, Validators.required),

                phone: [""]