Scenario:
I have the following controls:
<telerik:RadComboBox ID="dd1" runat="server" ValidationGroup="g1" InitialValue="-1" />
<telerik:RadComboBox ID="dd2" runat="server" ValidationGroup="g1" InitialValue="-1" />
<asp:CompareValidator ID="cv" runat="server" ValidationGroup="g1" InitialValue="-1"
ControlToValidate="dd1" ControlToCompare="dd2" Operator="NotEqual" Text="error"
Type="String" />
I don’t want the 2 dropDowns to have the same values, excluding “-1” which is the default value of any dropdown.
Can I achieve this using the compareValidator? or should i use javascript?
thanks in advance
For comparision, compare validator is correct. But for initial value (-1), you need to add required field validators for both dropdowns. So user must select value.