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

SelectedValue not set When tabbed out

2 Answers 78 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lynn
Top achievements
Rank 2
Lynn asked on 16 Feb 2010, 02:30 AM
I have a number of combo boxes on a web page that are all defined the same.

<telerik:RadComboBox   
ID="ListingState"   
TabIndex="4"   
EnableEmbeddedSkins="true"   
Skin="Black"   
runat="server"   
Width="250px"   
MarkFirstMatch="true"   
Height="200px"   
ToolTip="Select your state/province."   
OnClientSelectedIndexChanging="LoadCities"   
OnItemsRequested="ListingState_ItemsRequested" 
OnClientItemsRequested="ItemsLoaded" 
> 
</telerik:RadComboBox> 

Basically, all the combo boxes are setup to allow the user to key in their desired selection and have the combo box  move to that item.
When these combo boxes are populated, the "text" is populated using a string (such as Province/State name as in the above) and the "value" is populated using an Integer value that is the key to the database record represented in the combo box.

If the user keys in the desired value and, when the combo box locates the desired item, then the user tabs out of the field, the "combobox.selected value" is not being set and the cannot be retrieved (the code behind "blows up" because there is no integer value obtained from the selected value).  The "selected value" property returns a null value.

However, if the user mouse clicks on a specific item in the combo box, then the :selectedvalue" property returns the integer value and the code behind works fine.

Why?  If the user locates an item by keying and then tabs out, how do I pick up the value of the item that is displayed in the combo box and how do I know that this event has occurred?

Thanks in advance!

Lynn

2 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 19 Feb 2010, 10:58 AM
Hi Lynn,

Please excuse us for the delayed reply.

I made a sample page with three RadComboBoxes and dummy Data Sources and tried to reproduce the issue that you describe - but with no success.

To observe the RadComboBox behavior I followed this scenario: focused the first RadComboBox with tab key and then with arrow keys selected a continent, then I tabbed to the second RadComboBox and with arrow key selected a country, tabbed to the third RadComboBox and selected a city.

I repeated this once again but instead using arrow keys to select continent/country/city, I used the letter keyboard keys.

At the end I hit Submit button and the selected value and text of the third RadComboBox were set as text property of a label and displayed.

Could you please modify the sample page in order to reproduce the issue and send it back to me with more details?

Thank you in advance.


Greetings,
Kalina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Amjad
Top achievements
Rank 1
answered on 02 Jan 2013, 08:43 AM
Hello;

i have the same issue, it happened when i upgraded to telerik 2012 Q3:

1-write a certain item in a combobox list; this item gets highlighted.
2-then when i tab out the combo box this item gets selected.
3-when i get the selected value using javascript method get_value() it return empty string but if i select it by choosing an item with mouse it returns the selected value correctly.

please advise....

Tags
ComboBox
Asked by
Lynn
Top achievements
Rank 2
Answers by
Kalina
Telerik team
Amjad
Top achievements
Rank 1
Share this question
or