This is a migrated thread and some comments may be shown as answers.

Selecting first item in RadComboBox

7 Answers 464 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Veshala
Top achievements
Rank 1
Veshala asked on 25 Jan 2011, 10:14 PM
Hi,

I upgraded my application from 2009.Q1 to 2010.Q3.

I have code to create RadComboBox dynamically and bind dataset to ComboBox and set to 'no selection' like this:

radComboBox.Text = null;
                                radComboBox.SelectedValue = null;
                                radComboBox.SelectedIndex = -1;

The code which was working in previous version is not working in new version. It is selecting first item in the list items.

I tried setting following ways also:

 radComboBox.CloseDropDown();
 radComboBox.Text = "Select Option";

&

 radComboBox.CloseDropDown();
 radComboBox.Text = " ";

In both the cases, it is selecting the first item.

So what changed in new version, that causes not to work.

Thanks for any help.




7 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 Jan 2011, 11:18 AM
Hello Vanitha,

Thank you for writing.

As of Q2 2010 RadComboBox is an obsolete control and its successor is now called RadDropDownList. Since I am not sure which one exactly you use, I will provide you with code for accessing the BorderPrimitives of both controls:
//RadComboBox
radComboBox1.ComboBoxElement.ComboBoxBorder.ForeColor = Color.Red;
//RadDropDownList
BorderPrimitive radDropDownListBorderPrimitive = (BorderPrimitive)radDropDownList1.DropDownListElement.Children[2];
radDropDownListBorderPrimitive.ForeColor = Color.Tomato;

As to your question regarding removing the SelectedItem in RadComboBox, such functionality is not possible. For this reason, I will suggest that you upgrade your combo boxes to the new RadDropDownList. This will allow you to remove the SelectedItem by setting the SelectedIndex to -1.

I hope this information addresses your question. Let me know if you need further assistance.

Kind regards,
Stefan
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Veshala
Top achievements
Rank 1
answered on 27 Jan 2011, 10:54 PM

Hi Stefan,

I created support ticket to attach sample application to explain the problem.

Thanks

0
Stefan
Telerik team
answered on 02 Feb 2011, 11:09 AM
Hi Veshala,

Thank you for the clarification. Let me know if you need anything else.

All the best,
Stefan
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
brian
Top achievements
Rank 1
answered on 23 Nov 2012, 03:42 PM
Actually, Combox box is the current control and DropDownList is not...   right?
0
Nikolay
Telerik team
answered on 23 Nov 2012, 03:56 PM
Hi Brian,

RadComboBox was obsoleted and removed from our suite a long time ago. The current combo control in our WinForms suite is RadDropDownList.

Let me know if you have additional questions.

Greetings,
Nikolay
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
brian
Top achievements
Rank 1
answered on 23 Nov 2012, 04:30 PM
Thanks.  I was looking for ASP.NET, was in wrong forum.   Why do the different suites have different controls?
0
Nikolay
Telerik team
answered on 23 Nov 2012, 05:11 PM
Hi Brian,

Due to a number of feature requests and necessary improvements for RadComboBox for WinForms, it was decided that we should introduce a brand new control with new and better architecture that would allow us to extend it the way our customer request. This also prevented our users from encountering breaking changes, which would have happened if all the changes had occurred in an existing control. RadComboBox was kept in the suite for more than an year after being obsoleted, which gave our users time to switch from it the improved implementation.

All the best,
Nikolay
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Veshala
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Veshala
Top achievements
Rank 1
brian
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or