Hey All,
I am running into a few issues when I try to use required field validators on the radnumerictext box. On the actual form that I was trying to develop I have several RadNumericTextBox controls that the user must at least touch in order for the form to be valid. To make it more convenient I have used JQuery (and tried straight javascript) to set the textbox's value to 0 if the user tabs out with out entering anything. The problem I am having is that the RequiredFieldValidator's do not seem to recognize that there is a number in the rad numeric text box unless I actually press 0. I have tried this with a regular asp.net text box and it works. It also works with the rad numeric text box in Firefox & Chrome. I have created a simplified asp .net page. The customAttribute="hiddenSection3" on the RadNumericTextBox and the hidden fields at the bottom are just there so the Utils.js doesn't throw an error. I have also tried it with out the customAttribute and the result is the same.
Thanks in advance
I have the following page:
I am running into a few issues when I try to use required field validators on the radnumerictext box. On the actual form that I was trying to develop I have several RadNumericTextBox controls that the user must at least touch in order for the form to be valid. To make it more convenient I have used JQuery (and tried straight javascript) to set the textbox's value to 0 if the user tabs out with out entering anything. The problem I am having is that the RequiredFieldValidator's do not seem to recognize that there is a number in the rad numeric text box unless I actually press 0. I have tried this with a regular asp.net text box and it works. It also works with the rad numeric text box in Firefox & Chrome. I have created a simplified asp .net page. The customAttribute="hiddenSection3" on the RadNumericTextBox and the hidden fields at the bottom are just there so the Utils.js doesn't throw an error. I have also tried it with out the customAttribute and the result is the same.
Thanks in advance
I have the following page:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="IETester.aspx.vb" Inherits="IETester" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Untitled Page</
title
>
<
link
type
=
"text/css"
rel
=
"Stylesheet"
href
=
"css/chrome.css"
/>
<
script
language
=
"javascript"
type
=
"text/javascript"
src
=
"scripts/jquery-1.4.1.js"
></
script
>
<
script
language
=
"javascript"
type
=
"text/javascript"
src
=
"scripts/jquery-1.4.1.min.js"
></
script
>
<
script
language
=
"javascript"
type
=
"text/javascript"
src
=
"scripts/jquery-1.4.1-vsdoc.js"
></
script
>
<
script
language
=
"javascript"
type
=
"text/javascript"
src
=
"scripts/Utils.js"
></
script
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
telerik:RadNumericTextBox
ID
=
"RadNumericTextBox1"
runat
=
"server"
customAttribute
=
"hiddenSection3"
CssClass
=
"numeric"
NumberFormat-DecimalDigits
=
"0"
>
</
telerik:RadNumericTextBox
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Button"
/>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
runat
=
"server"
ErrorMessage
=
"RequiredFieldValidator"
Display
=
"Dynamic"
ControlToValidate
=
"RadNumericTextBox1"
></
asp:RequiredFieldValidator
>
<%-- <
telerik:RadInputManager
ID
=
"RadInputManager1"
runat
=
"server"
>
<
telerik:NumericTextBoxSetting
Type
=
"Currency"
BehaviorID
=
"Setting2"
Validation-IsRequired
=
"true"
EmptyMessage
=
"Error"
ErrorMessage
=
"Error"
Validation-ValidateOnEvent
=
"All"
>
<
TargetControls
>
<
telerik:TargetInput
ControlID
=
"RadNumericTextBox1"
Enabled
=
"true"
/>
</
TargetControls
>
</
telerik:NumericTextBoxSetting
>
</
telerik:RadInputManager
>
--%>
<
input
type
=
"hidden"
id
=
"hiddenIdentified"
value
=
"0"
/>
<
input
type
=
"hidden"
id
=
"hiddenPrevious"
value
=
"0"
/>
<
input
type
=
"hidden"
id
=
"hiddenTotal"
value
=
"0"
/>
<
input
type
=
"hidden"
id
=
"hiddenSection1"
value
=
"0"
/>
<
input
type
=
"hidden"
id
=
"hiddenSection2"
value
=
"0"
/>
<
input
type
=
"hidden"
id
=
"hiddenSection3"
value
=
"0"
/>
</
div
>
</
form
>
</
body
>
</
html
>