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

Losing the selected value from multiple autocomplete textboxes

When I try to save textbox values on click on Save button, values becoming empty. Can you help?
 <div class="ctrllabel">Rep</div>
                        <input type="text" id="autoRep" ej-autocomplete watermarkText="Rep"  [enableAutoFill]="true" width="100%" [dataSource]="flowers"    [(ngModel)]="selectedRep"/>
                        <div class="ctrllabel">Office</div>
                        <input type="text" id="autoOffice" ej-autocomplete watermarkText="Office"  [enableAutoFill]="true" width="100%" [dataSource]="flowers"  [(ngModel)]="selectedOffice"  />
                        <div class="ctrllabel">SalesRep</div>
                        <input type="text" id="autoRep" ej-autocomplete watermarkText="SalesRep"  [enableAutoFill]="true" width="100%" [dataSource]="flowers"  [(ngModel)]="value"  />
                        <input class="col-xs-2" id="myButton" value="Save"  (click)="onClick($event)" />

1 Reply

AP Arun Palaniyandi Syncfusion Team March 17, 2017 11:04 AM UTC

Hi Nagarjuna,   
Thanks for Contacting Syncfusion support.   
We tried to reproduce the mentioned scenario but unfortunately we were unable to reproduce it. We have used the Button click event to take the values of the autocomplete text boxes and on the Button Click, values are not turning to empty even on the two-way binding.   
  Please find the below sample for your reference.   
Also, we would like to know whether the values become empty on any postback or saved after any Database or something related to that. And please Open the console window and check for scripts errors. If you found any errors, please share us the screenshot and if possible use our shared sample to reproduce your issue.   
Please explain us more detailly so that it would be helpful for us to assist you further.   
Arun P.   

Live Chat Icon For mobile
Up arrow icon