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

RadcomboBox LoadOnDemand Property

2 Answers 42 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
DK
Top achievements
Rank 2
DK asked on 20 Nov 2009, 08:42 AM
I am using RadComboBox LoadonDemand Property.
Everything runnig well now.
but  now  there is some problem.
Suppose I am typing something in the combobox and that item  exists in the dataset that fills the combobox.
now  after filling or selecting  that item into the combobox if i  enter one or more spaces and then i tries to find the corrresponding value then its value is blank.....


I want that user can not enter spaces in the combobox or some other texts which is not matching.
please help me in this regard

2 Answers, 1 is accepted

Sort by
0
DK
Top achievements
Rank 2
answered on 20 Nov 2009, 09:11 AM
Is there any method or javascript by which i prevent entering space in the rad combobox.
I find the following link but was not helpfull for my requirement
will anyone plz customize it for my use?
 I will be thankful to him
0
Simon
Telerik team
answered on 20 Nov 2009, 11:43 AM
Hello DK,

You can modify the code as follows to make it work for the SPACE key only:

function onKeyDownHandler(e)
{
   if (!e)
       e = window.event;
        
   var code = e.keyCode || which;
   //do not allow the space ' ' character to be entered
   if (code == 32)     
   {
       e.returnValue = false;
       if (e.preventDefault)
       {
           e.preventDefault();
       }
   }       
}

Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
DK
Top achievements
Rank 2
Answers by
DK
Top achievements
Rank 2
Simon
Telerik team
Share this question
or