6

I have a autocomplete kendo control which I use with Angular, its working as expected but I don't want to show the "NO DATA FOUND" list when there are no records match the text that the user enter.

I find the option k-no-data-template but this set the template in case no data was found.

Basically I want to show the list only if there are match results.

mbadeveloper
  • 1,272
  • 9
  • 16

3 Answers3

7

You can try this:

noDataTemplate: ''

for example

$("#autocomplete").kendoAutoComplete({
   dataSource: [
     { id: 1, city: "Bangalore" },
     { id: 2, city: "Pune" }
  ],
  dataTextField: "city",
  noDataTemplate: ''
});

So here, No Data found message won't come and even if you want to customize it put then:

noDataTemplate: 'customized message'  // if you want to show your custom message to user

Hope it work for you.

Avnesh Shakya
  • 3,828
  • 2
  • 23
  • 31
0

You can set the option k-no-data-template="''"

mbadeveloper
  • 1,272
  • 9
  • 16
0

You can set this globally by css/sass:

.k-nodata
  *
    display: none
  &:after
    content: 'your custom text'
dimson d
  • 1,488
  • 1
  • 13
  • 14