Hi all
I find problem with RadcomboBox & RequiredFieldValidator
RadcomboBox it bound with table in database name country
in databound event i add this
cboxCountry.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("- Select -", null));
this for insert text SELECT to be default
when i add RequiredFieldValidator and set its propriety in design time like
ControlToValidate = cboxCountry
InitialValue = - select -
and run this page
when it run and click on button next it fire the RequiredFieldValidator
and it works
but when select another item like USA and return to "- select -"
and press NEXT button it didn't fire RequiredFieldValidator
how can control it ??
I find problem with RadcomboBox & RequiredFieldValidator
RadcomboBox it bound with table in database name country
in databound event i add this
cboxCountry.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("- Select -", null));
this for insert text SELECT to be default
when i add RequiredFieldValidator and set its propriety in design time like
ControlToValidate = cboxCountry
InitialValue = - select -
and run this page
when it run and click on button next it fire the RequiredFieldValidator
and it works
but when select another item like USA and return to "- select -"
and press NEXT button it didn't fire RequiredFieldValidator
how can control it ??
6 Answers, 1 is accepted
0
Hi Mohamed,
Please have a look at our online example on Validation. Could you reproduce the same issue with it?
Also,could you please open a support ticket and send us a simple running project to test it locally? We will review it and provide you with a solution or more specific instructions.
Regards,
Rosi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please have a look at our online example on Validation. Could you reproduce the same issue with it?
Also,could you please open a support ticket and send us a simple running project to test it locally? We will review it and provide you with a solution or more specific instructions.
Regards,
Rosi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Mohamed
Top achievements
Rank 1
answered on 31 May 2008, 09:42 AM
Hi Rosi ,
i use win 2008 server
I still find problem in validating combobox
when select value other "Select city" in fire compare validator and its OK
but when turn back by button browser Back and value in combobox NotEqual "Select city" and press Enter button it also fire compare validator and this not correct
you can check it in demos
http://www.telerik.com/DEMOS/ASPNET/Prometheus/ComboBox/Examples/Functionality/Validation/DefaultCS.aspx
this case also happened when add combobox in Microsoft wizard
and use Next,Previous buttons
i use win 2008 server
I still find problem in validating combobox
when select value other "Select city" in fire compare validator and its OK
but when turn back by button browser Back and value in combobox NotEqual "Select city" and press Enter button it also fire compare validator and this not correct
you can check it in demos
http://www.telerik.com/DEMOS/ASPNET/Prometheus/ComboBox/Examples/Functionality/Validation/DefaultCS.aspx
this case also happened when add combobox in Microsoft wizard
and use Next,Previous buttons
0
Hello Mohamed,
Please try the following javascript:
This should helps.
Regards,
Rosi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please try the following javascript:
<script type="text/javascript"> |
function pageLoad() |
{ |
var combo =$find("RadComboBox1"); |
if(combo.get_text()!=" - Select a City - ") |
combo.findItemByText(combo.get_text()).select(); |
} |
</script> |
This should helps.
Regards,
Rosi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
a a
Top achievements
Rank 1
answered on 10 Jul 2013, 12:02 PM
Hi,
We are experiencing same issue.
We have a radcombobox which has requiredfieldvalidator associated with it. For the first time it validates the required value, but if we select some value from dropdown and then select the "--Select--" back in the dropdown, its not validated by requiredfieldvalidator. We have tried InitalValue of requiredfieldvalidator with both "Text" and "Value" of 1st item in the dropdown (1st item is --select--).
Please help.
We are experiencing same issue.
We have a radcombobox which has requiredfieldvalidator associated with it. For the first time it validates the required value, but if we select some value from dropdown and then select the "--Select--" back in the dropdown, its not validated by requiredfieldvalidator. We have tried InitalValue of requiredfieldvalidator with both "Text" and "Value" of 1st item in the dropdown (1st item is --select--).
Please help.
0
Shinu
Top achievements
Rank 2
answered on 11 Jul 2013, 06:32 AM
Hi
Please check the following code I tried which works fine at my end.
ASPX:
Thanks,
Shinu.
Please check the following code I tried which works fine at my end.
ASPX:
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
>
<
Items
>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Select"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Item 1"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Item 2"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Item 3"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Item 4"
/>
</
Items
>
</
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
runat
=
"server"
ControlToValidate
=
"RadComboBox1"
InitialValue
=
"Select"
ForeColor
=
"Red"
>*
</
asp:RequiredFieldValidator
>
Thanks,
Shinu.
0
Andy
Top achievements
Rank 1
answered on 23 Mar 2016, 10:09 AM
In the demo validation passes if you just type any text into product and region comboboxes. I'm using custom validator for comboxboxes with custom text allowed and check if both selected value and text are not empty. Is there's a better way round?