i have created a RadNumericTextBox inside a Talerik Rad Grid Edit form template as below:
<telerik:RadNumericTextBox ID="rdtbTPCCommissionAmount" DataType="System.Decimal"
EnabledStyle-HorizontalAlign="Right" Type="Number" NumberFormat-DecimalDigits="2"
ReadOnly="true" AutoPostBack="false" CssClass="amountDueWidth disableInputStyle"
runat="server" NumberFormat-AllowRounding="true" Style="width: 100% !important;"
Width="100%">
<IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="false" />
</telerik:RadNumericTextBox></pre
On a another RadNumericTextBox blur event i calling a Javascript funtion as below:
<pre lang="xml">function validateThirdPartyCommissionRate(){
validateThirdPartyRate("<%= rgThirdPartyCommissions.ClientID %>");
}
From this above funtion i am calling a method written in JS file like below and setting some value to that RadNumericTextBox:
function validateThirdPartyRate(radGridId) {
var grid = $find(radGridId).get_element();
var commissionAmt = $telerik.findElement(grid, "rdtbTPCCommissionAmount");
var calculatedAmount = parseFloat(rate) * parseFloat(premiumFeeAmt) / 100;
commissionAmt._setNewValue(calculatedAmount);
$("#ctl00_cphMainContentPage_rgThirdPartyCommissions_ctl00_ctl07_rdtbTPCCommissionAmount").val = calculatedAmount;
commissionAmt._value = calculatedAmount.toFixed(2);
commissionAmt._text = calculatedAmount.toFixed(2);
commissionAmt.value = calculatedAmount
}
I have used all diffrent property/methods to set the value some of them are setting the value on UI but when i tried to DirectCast this control on serverside it gives me it's old value not the updated which i set from Javascript just like above.
commissionAmt = DirectCast(editedItem.FindControl("rdtbTPCCommissionAmount"), RadNumericTextBox).Text
So suggestion will be welcome to to fix this issue?