Click here to Skip to main content
12,952,281 members (50,607 online)
Rate this:
Please Sign up or sign in to vote.
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?
Posted 1-Jul-12 4:57am
Updated 1-Jul-12 5:00am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You better ask this question from telerik forum. here is a thread from there disusing similar problem[^]
Pooyan Behroozfar 4-Aug-12 4:00am
i want to do it automaticaly when i clear it runtime with backspace.
what can i do?
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

combo.selectedIndex = -1

Happy Coding!
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
aarti meswania 9-Aug-12 6:54am
Thank you! :)
Volynsky Alex 9-Aug-12 6:56am
You are welcome aarti :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

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.
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,239
CHill60 3,490
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,880

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 9 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100