Introduction
Kendo autocomplete is the control that provides a suggestion based on the input given in a text box. In this blog, I’m going to explain how to implement a Kendo tooltip in the autocomplete control to show some additional information about a list item.
Kendo Autocomplete
Here is a simple demo to implement the Kendo autocomplete with static data source.
- <!DOCTYPE html>
- <html>
- <head>
- <base href="https://demos.telerik.com/kendo-ui/autocomplete/index">
- <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
- <title></title>
- <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2018.1.117/styles/kendo.common-material.min.css" />
- <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2018.1.117/styles/kendo.material.min.css" />
- <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2018.1.117/styles/kendo.material.mobile.min.css" />
- <script src="https://kendo.cdn.telerik.com/2018.1.117/js/jquery.min.js"></script>
- <script src="https://kendo.cdn.telerik.com/2018.1.117/js/kendo.all.min.js"></script>
- </head>
- <body>
- <div id="example">
- <div class="demo-section k-content">
- <h4><label for="countries">Choose shipping countries:</label></h4>
- <input id="countries" style="width: 25%;" />
- </div>
- <script>
- $(document).ready(function () {
- var data = [
- {
- "value": 1,
- "code" : "IND",
- "Desc": "India"
- },
- {
- "value": 2,
- "code":"SG",
- "Desc": "Singapore"
- },
- {
- "value": 3,
- "code":"UK",
- "Desc": "United Kingdom"
- }
- ]
- $("#countries").kendoAutoComplete({
- dataSource: data,
- dataTextField:"code",
- dataValueField:"value",
- filter: "startswith",
- placeholder: "Select country...",
- separator: ", "
- });
- });
- </script>
- </div>
- </body>
- </html>
Result
Figure 1

Join the conversation! Your thoughts help the community grow.