Click or drag to resize
KaxComboBoxOnClientKeyPressing Property
The client-side event that is fired when the user presses a key inside the combobox.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientKeyPressing { get; set; }

Property Value

Type: String
Remarks

The event handler receives two parameters:

  • the instance of the combobox client-side object;
  • browser event arguments.

You can use the browser event arguments (and the keyCode property in particular) to detect which key was pressed and to write your own custom logic.

Examples
[New Example]
<kettic:kaxcombobox 
  Runat="server"
  ID="KaxComboBox3"       
  OnClientKeyPressing="HandleKeyPress" 
 ... 
/>

   <script type="text/javascript">

   function HandleKeyPress(sender, e)
   {
    if (e.keyCode == 13)
    {
     document.forms[0].submit();
    }
   }

   </script>
See Also