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

SelectedValue Problem

6 Answers 191 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
possible
Top achievements
Rank 1
possible asked on 03 Jan 2008, 08:26 AM
Hi..

I have a problem with below code:

            cbU.DataSource = UsersManager.Controller.GetUsers(Common.PortalId());
            cbU.DataValueField = "UserID";
            cbU.DataTextField = "DisplayName";
            cbU.DataBind();

            cbU.Items.Add(new Telerik.Web.UI.RadComboBoxItem("-", String.Empty));
            cbU.SelectedValue = String.Empty;

After running it in ComboBox still selected is first element not the one with empty value. I have tried the latest hotfix but this doesnt help.

6 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 03 Jan 2008, 12:00 PM
Hello tspossible,

I suggest you use " " instead of String.Empty, like:

RadComboBox1.Items.Add(new Telerik.Web.UI.RadComboBoxItem("-", " "));
RadComboBox1.SelectedValue = " ";

Hope this helps.


Kind regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
possible
Top achievements
Rank 1
answered on 03 Jan 2008, 02:10 PM
Hi

Thanks, now it works. But can I believe that this is a temporary solution and will be fixed in next release?
0
Rosi
Telerik team
answered on 03 Jan 2008, 05:25 PM
Hi ,

This should work with the latest hotfix which I have attached to this message. Please download it and give it a try.

Hope this helps.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mike
Top achievements
Rank 1
answered on 04 Jan 2008, 07:22 PM
I was having the same issue as stated above and it was fixed with this hotfix.  However, now I'm periodically getting a purchase warning on some controls like this isn't hotfix for the paid version.

When can we expect a hotfix for the paid version?
0
Nyceane
Top achievements
Rank 1
answered on 05 Jan 2008, 03:37 AM
i am having same problem, selected value just won't work no matter how i set up the key value, i need to build this thing fast, right now I am storing it in the txt field...
0
Rosi
Telerik team
answered on 07 Jan 2008, 09:57 AM
Hi ,

You can obtain a dev hotfix if you open a support ticket and request it. The next official version of Prometheus suite will be released by the end of the month.

All the best,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
possible
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
possible
Top achievements
Rank 1
Rosi
Telerik team
Mike
Top achievements
Rank 1
Nyceane
Top achievements
Rank 1
Share this question
or