Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stéphane NOUHAUD on Apr 21, 2008 07:59
open dhtmlx forum
Trap Enter key in Header

Hi,

How i can trap enter keypress in input field in header (for detect reloading grid with this filter) ?

Thanks

Stéphane NOUHAUD
Answer posted by Support on Apr 21, 2008 08:24
There is no special methods in grid API.
When you are using built in filtering it is done automatically.
If you implementing some custom UI - you can attach event by direct DOM manipulations.

    document.getElementById('h_input').onkeypress=function(e){
       if ( (e||event).keyCode == 13 ){
             //custom code here
        }
    })