Hey everyone
i have a RadNumericTextbox inside grid edit form--
javascript --
codebehind--
is it possible to get the product on label on text change of textbox,by keypress event?....i want the text of label to change with text change of textbox.
Thanks
Amit
i have a RadNumericTextbox inside grid edit form--
<
telerik:RadNumericTextBox
ID
=
"txtQuantityE"
autocomplete
=
"off"
runat
=
"server"
Skin
=
"Hay"
EmptyMessage
=
"Enter Quantity"
SelectionOnFocus
=
"CaretToEnd"
ToolTip
=
"Enter Quantity to place Order"
Culture
=
"English (United States)"
Height
=
"14px"
Width
=
"141px"
MaxValue
=
"9999"
MinValue
=
"1"
>
<
NumberFormat
GroupSeparator
=
""
DecimalDigits
=
"0"
AllowRounding
=
"true"
KeepNotRoundedValue
=
"false"
/>
<
ClientEvents
OnKeyPress
=
"KeyPress"
/>
</
telerik:RadNumericTextBox
>
function
show(txtQuantityE, lblRate, lblAmount, Amount)
{
var
txtQuantityE = $find(txtQuantityE);
var
lblRate = document.getElementById(lblRate);
var
lblAmount = document.getElementById(lblAmount);
var
Amount = document.getElementById(Amount);
Amount.value = parseInt(txtQuantityE.get_value()) * parseInt(lblRate.innerHTML);
lblAmount.innerHTML = parseInt(txtQuantityE.get_value()) * parseInt(lblRate.innerHTML);
}
function
KeyPress(sender, args)
{
if
(args.get_keyCharacter() == sender.get_numberFormat().DecimalSeparator) {
args.set_cancel(
true
);
}
if
(args.get_keyCode() == 45)
{
alert(
"Enter non-negative numbers only"
);
args.set_cancel(
true
);
}
}
txtQauntityE.Attributes.Add(
"onblur"
,
"return show('"
+ txtQauntityE.ClientID +
"','"
+ lblRate.ClientID +
"','"
+ lblAmount.ClientID +
"','"
+ Amount.ClientID +
"')"
);
Thanks
Amit