Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi my dear friends.
when i clear the radcombobox text property the selected value is still valued. i want to set the selected value to null when i clear the text property. How can i do that?
thanks.
Posted
Updated 1-Jul-12 5:00am
v2

You better ask this question from telerik forum. here is a thread from there disusing similar problem

http://www.telerik.com/community/forums/aspnet/combobox/how-do-i-clear-a-radcombobox-including-selecteditem.aspx[^]
 
Share this answer
 
Comments
Pooyan Behroozfar 4-Aug-12 4:00am    
i want to do it automaticaly when i clear it runtime with backspace.
what can i do?
set
VB
combo.selectedIndex = -1


Happy Coding!
:)
 
Share this answer
 
Comments
Pooyan Behroozfar 6-Aug-12 2:20am    
i know that. but when i clear it with backspace the selected index still remains.
Aarti Meswania 6-Aug-12 3:02am    
yes if you are removing string the 'selected index' will be same, because there is not any index available for empty string
you add an empty string element in your combobox
Pooyan Behroozfar 7-Aug-12 1:49am    
OK. Thank you.
Aarti Meswania 7-Aug-12 1:55am    
welcome! :)
Volynsky Alex 9-Aug-12 6:53am    
Good!
You can add one key value pair to data source of comboBox. Set its value to null or int.MinValue when display member is string.Empty.
 
Share this answer
 
Comments
Pooyan Behroozfar 9-Aug-12 3:34am    
How can i add one key value pair to data source?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900