We have a specific requirement where a radcombox is defined with the following properties
As and when the user types in a text, the items are returned and by accessing the selectedvalue property I am able to retrieve the current selection.
But since custom text is allowed, user can type in any custom text and click insert. We cannot accept the user to insert custom values. When I check the text property of the radcombobox, its the custom text (adhoc value), but the selectedvalue retains the value of previously selected items value. I was expecting the selectedvalue to be null or empty string in case of an adhoc value.
On checking various telerik forums and google, suggestion to overcome this issue is use RadComboBox.Value property. But to my surprise, the 'value' property is not exposed. I tried using the SelectedItem.Value, but as rightly pointed out in Telerik troubleshooting SelectedItem will be null in case of LoadOnDemand.
Please suggest a way by which we can get to know whether the user has not entered any custom text (ad hoc).
Please note that the telerik radcombo is inside an user control, which is loaded as a pop-up.
I cannot set the allowcustomtext to false as I fetch items on item requested event.
Kindly suggest me a way to overcome this issue.
- Allowcustomtext is true
- EnableOnDemand is true
- Items are loaded on ItemsRequested event
- EnableViewstate and EnableItemcaching is false
As and when the user types in a text, the items are returned and by accessing the selectedvalue property I am able to retrieve the current selection.
But since custom text is allowed, user can type in any custom text and click insert. We cannot accept the user to insert custom values. When I check the text property of the radcombobox, its the custom text (adhoc value), but the selectedvalue retains the value of previously selected items value. I was expecting the selectedvalue to be null or empty string in case of an adhoc value.
On checking various telerik forums and google, suggestion to overcome this issue is use RadComboBox.Value property. But to my surprise, the 'value' property is not exposed. I tried using the SelectedItem.Value, but as rightly pointed out in Telerik troubleshooting SelectedItem will be null in case of LoadOnDemand.
Please suggest a way by which we can get to know whether the user has not entered any custom text (ad hoc).
Please note that the telerik radcombo is inside an user control, which is loaded as a pop-up.
I cannot set the allowcustomtext to false as I fetch items on item requested event.
Kindly suggest me a way to overcome this issue.