Nothing found in Kendo UI Combobox -


is there way notify user nothing found search query? in jira comboboxes. > http://i.stack.imgur.com/rksga.png

there nothing integrated, can build yourself.

see jsfiddle demo.

basically, what's happening is:

  1. return server. if there wasn't found, dummy entry special id.
  2. register select-event on combobox.
  3. in event, check see if selected item has special id, , if yes, cancel event e.preventdefault()

code:

$('input').kendocombobox({     datatextfield: 'text',     datavaluefield: 'id',     datasource: {         transport: {             read: function(options) {                 //instead, specify ajax call!                 options.success([{ id: -1, text: 'no matches...' }]);             }         }     },     placeholder: "select...",     select: function(e) {         var dataitem = this.dataitem(e.item.index());         if(dataitem.id === -1) {             e.preventdefault();         }     } }); 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -