I have in a page the code below for a radwindow used as a modal popup. For some reason no matter what I do the validators will not fire when I click the btnAddUserToRoleSave button. Is there some trick to using validators in a modal window box? Thanks.
<
telerik:RadWindowManager
ID
=
"rwmManagerUsers"
runat
=
"server"
Style
=
"z-index: 3"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"rwManagerUsers_SelectUsers"
runat
=
"server"
OnClientClose
=
"rwManagerUsers_SelectUsers_OnClientClose"
Modal
=
"true"
AutoSize
=
"true"
Behaviors
=
"Close"
v>
<
ContentTemplate
>
<
asp:ValidationSummary
ID
=
"vsAddUserToRoleValidationSummary"
runat
=
"server"
EnableClientScript
=
"true"
ShowMessageBox
=
"true"
ValidationGroup
=
"vgAddUserToRoleForm"
HeaderText="ERROR! The user cannot be set due to the following reasons:
" />
<
table
>
<
tr
>
<
td
><
asp:Label
ID
=
"lblSelectedUser"
Text
=
"User:"
runat
=
"server"
></
asp:Label
></
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"ddlSelectedUser"
runat
=
"server"
DataTextField
=
"DisplayName"
DataValueField
=
"UserName"
></
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"rfvSelectedUser"
runat
=
"server"
Text
=
"*"
ErrorMessage
=
"A User must be selected."
ToolTip
=
"A User must be selected."
ControlToValidate
=
"ddlSelectedUser"
ValidationGroup
=
"vgAddUserToRoleForm"
InitialValue
=
"-1"
></
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
><
asp:Label
ID
=
"lblSelectedLocation"
Text
=
"Location:"
runat
=
"server"
></
asp:Label
></
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"ddlSelectedLocation"
runat
=
"server"
DataTextField
=
"Description"
DataValueField
=
"LocationCode"
></
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"rfvSelectedLocation"
runat
=
"server"
Text
=
"*"
ErrorMessage
=
"A Location must be selected."
ToolTip
=
"A Location must be selected."
ControlToValidate
=
"ddlSelectedLocation"
ValidationGroup
=
"vgAddUserToRoleForm"
InitialValue
=
""
></
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
>
<
asp:Button
ID
=
"btnAddUserToRoleSave"
runat
=
"server"
Text
=
"Add User To Role"
OnClick
=
"btnAddUserToRoleSave_Click"
ValidationGroup
=
"vgAddUserToRoleForm"
/>
<
asp:Button
ID
=
"btnAddUserToRoleCancel"
runat
=
"server"
Text
=
"Cancel"
OnClientClick
=
"rwManagerUsers_Cancel();cancelEvent()"
/>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>