<
telerik:RadDropDownList
ID
=
"rdl_bu"
runat
=
"server"
DataSourceID
=
"LDS_BU"
DefaultMessage
=
"Please select..."
DataValueField
=
"BU_ID"
DataTextField
=
"BU_name"
AutoPostBack
=
"true"
>
</
telerik:RadDropDownList
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator11"
runat
=
"server"
ControlToValidate
=
"rdl_bu"
InitialValue
=
"Please Select..."
ErrorMessage
=
"Please select a Business Unit."
></
asp:RequiredFieldValidator
>
9 Answers, 1 is accepted

Please remove the
InitialValue="Please Select..."
property from your Requiredfieldvalidator.
Thanks,
A2H


<telerik:RadDropDownList runat="server" ID="ddlPatients" Width="358px">
</telerik:RadDropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ErrorMessage="Patient ID is Required"
ControlToValidate="ddlPatients" runat="server" Text="<img src='../App_Themes/Images/exclamation.png' />"
SetFocusOnError="True" />
If this is the very same implementation that you are using at your end, the RadDropDownList would be populated, with setting its first item as selected. In this case the validation would pass, because a PatientID is actually selected. If you want to push the user to select an item different from the first one, you could set the InitialValue property of the Required Field Validator and set first item's Text to the InitialValue property, like demonstrated in this video. Other possible implementation would be to set the DefaultMessage property of the RadDropDownList. Thus you would avoid preselecting the first item of the DropDownListItemsCollection, like demonstrated in this video.
Regards,
Nencho
Telerik

Thanks

I know this post have some time already. I was having the same issue with rad ddl and required field validators and your video help me out. But, what I realized is that there is something odd about required field validator, because, why is it called "InitialValue" if it is considering the Text of the dropdownlist item?
I was always using on my asp.net dropdownlists the Text="- Select -" and the Value="", so my first guess to solve my issue was to put InitialValue="" but it was not working. By checking your video l saw that it was expecting the Text "- Select -" to work properly.
Maybe the property should be called "InitialText" and not "InitialValue" what do you think?, or better: it should be checking the value property from dropdownlist and not the selected text.
Regards
Indeed, the naming convention could be differently interpreted and sometimes it could cause such misunderstanding. However, I am afraid that the asp:RequiredFieldValidator is not under our jurisdiction and we would have to accept it as it is.
Regards,
Nencho
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Hi,
Required Field Validator works only after the button event has been triggered. Button Submit should not work if the two raddatepickers are empty. It works only after the button submit event has been completed. Please help.
<table style="margin-left: 30px; ">
<tr>
<td >
<asp:Label ID="Label2" runat="server" Text="Date From:" Font-Size="12px"></asp:Label>
</td>
<td >
<telerik:RadDatePicker ID="txtFromDate" Runat="server" Visible="true" Font-Size="12px" MinDate="2015-01-01">
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="txtFromDate" Display="Dynamic" EnableClientScript="false"></asp:RequiredFieldValidator>
</td>
<td >
<asp:Label ID="Label1" runat="server" Text="Date To:" Font-Size="12px"></asp:Label>
</td>
<td>
<telerik:RadDatePicker ID="txtToDate" Runat="server" Visible="true" Font-Size="12px" MinDate="2015-01-01">
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="txtToDate" Display="Dynamic" EnableClientScript="false"></asp:RequiredFieldValidator>
</td>
<td>
<asp:Button runat="server" ID="btnSubmit" Text="SEARCH" CausesValidation="true" />
</td>
</tr>
</table>
When the EnableClientScript property is set to false, the control validates after the post back. Setting it to true, the validation will kick in and prevent the post back if values are not present.
<
table
style
=
"margin-left: 30px;"
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
Text
=
"Date From:"
Font-Size
=
"12px"
></
asp:Label
>
</
td
>
<
td
>
<
telerik:RadDatePicker
ID
=
"txtFromDate"
runat
=
"server"
Visible
=
"true"
Font-Size
=
"12px"
MinDate
=
"2015-01-01"
>
</
telerik:RadDatePicker
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
runat
=
"server"
ErrorMessage
=
"*"
ForeColor
=
"Red"
ControlToValidate
=
"txtFromDate"
Display
=
"Dynamic"
EnableClientScript
=
"true"
></
asp:RequiredFieldValidator
>
</
td
>
<
td
>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"Date To:"
Font-Size
=
"12px"
></
asp:Label
>
</
td
>
<
td
>
<
telerik:RadDatePicker
ID
=
"txtToDate"
runat
=
"server"
Visible
=
"true"
Font-Size
=
"12px"
MinDate
=
"2015-01-01"
>
</
telerik:RadDatePicker
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator2"
runat
=
"server"
ErrorMessage
=
"*"
ForeColor
=
"Red"
ControlToValidate
=
"txtToDate"
Display
=
"Dynamic"
EnableClientScript
=
"true"
></
asp:RequiredFieldValidator
>
</
td
>
<
td
>
<
asp:Button
runat
=
"server"
ID
=
"btnSubmit"
Text
=
"SEARCH"
CausesValidation
=
"true"
/>
</
td
>
</
tr
>
</
table
>
Kind regards,
Attila Antal
Progress Telerik