Hi Binu,
Thanks for contacting Syncfuision support.
You can get the selected Item’s id in the args of “select” event. Item id cannot be taken from args of Change event since every item is associated with its own id and change event may also rises due to incomplete texts in the autocomplete box. Please refer the following code snippet.
input.ejAutocomplete({dataSource: contentItem.value.data,
fields: { text:label,key:value },
select: function (args) { contentItem.value.selectedItem = contentItem.value.data[args.key];} });
|
To know more about Autocomplete component properties, methods, and events, refer to the below link.
http://help.syncfusion.com/js/api/ejautocomplete
Regards,
Francis Paul A