New to Kendo UI for jQuery? Download free 30-day trial

Prevent POST on Enter Key Press in the ComboBox


Product Progress Kendo UI ComboBox for jQuery
Operating System Windows 10 64bit
Visual Studio version Visual Studio 2017
Preferred Language JavaScript


How can I prevent POST on an Enter key press in a Kendo UI ComboBox?


The following example demonstrates how to achieve the desired scenario.

<div id="example" role="application">
      <h4>T-shirt Fabric</h4>
      <input id="fabric" placeholder="Select fabric..." />

      <h4>T-shirt Size</h4>
      <select id="size" placeholder="Select size...">

      <button class="k-button" id="get">Post</button>
      $(document).ready(function() {
          // create ComboBox from input HTML element
              dataTextField: "text",
              dataValueField: "value",
              dataSource: [
                  { text: "Cotton", value: "1" },
                  { text: "Polyester", value: "2" },
                  { text: "Cotton/Polyester", value: "3" },
                  { text: "Rib Knit", value: "4" }
              filter: "contains",
              suggest: true,
              index: 3

          // create ComboBox from select HTML element

          var fabric = $("#fabric").data("kendoComboBox");
          var size = $("#size").data("kendoComboBox");

          function preventPost(e) {
            if (e.keyCode === 13) {


See Also

In this article