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

[Solved] "---Select---" with required field validation

2 Answers 113 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
vishesh kumar
Top achievements
Rank 1
vishesh kumar asked on 08 Mar 2010, 07:45 AM
Hi,

I have the following requirements:

1. Need to display the default "---Select---" item. (this is being set using the empty message property)
2. this field is required.

So in order to use the empty message property, I need to set the "Allow custom text" = true property.
But in this case, the user is allowed to type in any arbit value into the combobox and bypass the required field validation.

Please let me know how to do go about achieving this?

Thanks

2 Answers, 1 is accepted

Sort by
0
liu qingshui
Top achievements
Rank 1
answered on 08 Mar 2010, 08:57 AM

You can do it in the CS file like this:

radComboBox1.intems.insert(0,new Telerik.Web.UI.RadComboBoxItem("please select...", ""));
0
Veronica
Telerik team
answered on 08 Mar 2010, 03:43 PM
Hello liu qingshui,

Please take a look at this topic about Insert a default item when databinding RadComboBox.

If you have more questions don't hesitate and please let me know if this was helpful.

Greetings,
Veronica Milcheva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
vishesh kumar
Top achievements
Rank 1
Answers by
liu qingshui
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or