Click here to Skip to main content
11,496,146 members (795 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: C#2.0 C#3.0 C# C#4.0
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 5:57am
Edited 1-Jul-12 6:00am
You better ask this question from telerik forum. here is a thread from there disusing similar problem[^]
Pooyan Behroozfar at 4-Aug-12 4:00am
i want to do it automaticaly when i clear it runtime with backspace.
what can i do?
combo.selectedIndex = -1

Happy Coding!
Smile | :)
Pooyan Behroozfar at 6-Aug-12 2:20am
i know that. but when i clear it with backspace the selected index still remains.
aarti meswania at 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 at 7-Aug-12 1:49am
OK. Thank you.
aarti meswania at 7-Aug-12 1:55am
welcome! :)
Volynsky Alex at 9-Aug-12 6:53am
aarti meswania at 9-Aug-12 6:54am
Thank you! :)
Volynsky Alex at 9-Aug-12 6:56am
You are welcome aarti :)
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 at 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
0 Dnyaneshwar@Pune 692
1 RyanDev 230
2 CHill60 163
3 Sascha Lefèvre 145
4 Sergey Alexandrovich Kryukov 124
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600

Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 9 Aug 2012
Copyright © CodeProject, 1999-2015
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