I have a number of combo boxes on a web page that are all defined the same.
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
<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