Dear All,
I have a grid on my website, This grid uses paging, When I'm on page three and then try to press enter on a text box in a row in the grid,
it moves to page 1 because the default button in grid paging panel is go to first page, I need to disable this button while pressing enter
Thanks
3 Answers, 1 is accepted
0
Vasil
Telerik team
answered on 22 Jul 2011, 09:35 AM
Hi Mohamed,
It depends on what exactly you are trying to achieve.
Do you need the text-box to make a post-back? Do you want when hitting enter nothing to happens? Are you using ASP:TextBox or telerik:RadTextBox? is the text box has AutoPostBack set to "true" or "false"? Is the textbox located in the edit form, edited row, or in the ItemTemplate of some column?
Additionally you have two options for avoiding the first pager button to make a post-back on hitting enter.
1) Place a hidden 'dummy' button that to be default button on the form. And set it's click to be "return false;" This will prevent it from making post-back.
2) Handle onkeydown event of the input and cancel it's bubbling. Note that this is browser depended solution( FF, IE)
Best wishes,
Vasil
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I like the hidden button idea, but when style="hidden:none", Chrome executes the Cancel button instead of this one.
Without hidden:none everything works fine.
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now