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

Disable arrow keys

1 Answer 102 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 14 Apr 2015, 11:09 AM

Hello

What is the best way to disable Arrowkeys on a closed RadCombo?

(open radcombo should still have arrow key functionality)

 

I have tried to break selection in a Keypressing event without success,(it should also consider if radcombo is open or not) :

 

  <script type="text/javascript">

        function combokeypress(sender, args) {
            if (args.get_domEvent().keyCode == 40){

                args.set_cancel(true); //not working!
            }
        }

</script>

  <telerik:RadComboBox ID="RadComboBox1" Runat="server" OnClientKeyPressing="combokeypress"  
            ResolvedRenderMode="Classic" TabIndex="1">

 

 

 Any hints?

Regards

 

Mark

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 16 Apr 2015, 01:50 PM
Hello,

The client-side OnClientKeyPressing event cannot be cancelled, that is why calling the set_cancel() method in its event handler when the DropDown is not opened would not have the desired effect.

Regards,
Ivan Danchev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ComboBox
Asked by
Mark
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or