This is a migrated thread and some comments may be shown as answers.

Header context filter menu for grid not working on enter key press

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
deepti
Top achievements
Rank 1
deepti asked on 17 Jul 2012, 02:34 PM
Hi,

I am using telerik grid with header context filter menu implemented as attached in image 'Filter_Enter-Key__Issue.JPG'. Currently filter is not working on pressing 'Enter key' in input textbox. Filter only works if we press 'Filter' button.
Could you please suggest any solution to work filter on 'Enter' key press? Or is there any way to disable 'Enter' key press event for filtering?
Note:- This issue exists in all browsers(IE, FF, chrome)

Thanks and Regards,
Deepti

1 Answer, 1 is accepted

Sort by
0
O.D.
Top achievements
Rank 1
answered on 18 Jul 2012, 02:00 PM
Hello deepti,

One suggestion for handling the Enter key issue, would be to use the ClientEvents-OnKeyPress event of RadTextBox, detect Enter key, and then decide on what to do. Either Click programatically on the Filter Button, or disable it, which ever works best.

function OnKeyPress(sender, eventArgs) 
   var c = eventArgs.get_keyCode(); 
   if (c == 13) 
   { 
     __doPostBack('Button1','');      
   }      

Related post :
http://www.telerik.com/community/forums/aspnet-ajax/input/onkeypress-in-radtextbox-client-side.aspx 

Kind Regards,
Tags
Grid
Asked by
deepti
Top achievements
Rank 1
Answers by
O.D.
Top achievements
Rank 1
Share this question
or