BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<ej:Autocomplete ID="categoryGrouping" Width="205px" ShowPopupButton="true" FilterType="Contains" HighlightSearch="true" runat="server" WatermarkText="Select a category" ClientSideOnSelect="OnSelect"/>
<script type="text/javascript">
function OnSelect(args)
{
alert(args.key);
}
</script>
</code>
We have prepared a sample based on this and you can refer to it from the following link:
Sample: Sample
Also, you can use “getSelectedItem()” method in “ClientSideOnSelect” event to get the selected item id. Refer to the following code example for the same,
<code>
<ej:Autocomplete ID="categoryGrouping" Width="205px" ShowPopupButton="true" FilterType="Contains" HighlightSearch="true" runat="server" WatermarkText="Select a category" ClientSideOnSelect="OnSelect"/>
<script type="text/javascript">
function OnSelect(args)
{
var autocompleteObj = $("#<%=categoryGrouping.ClientID%>").data("ejAutocomplete");
alert(autocompleteObj.getSelectedItems()[0].ID);
}
</script>
</code>
To know more about properties, methods and events of Autocomplete component, refer to the following API link,
http://help.syncfusion.com/js/api/ejautocomplete
Please let us know if you have any queries.
Regards,
Kasithangam