Click here to Skip to main content
15,909,242 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have created a RadNumericTextBox inside a Talerik Rad Grid Edit form template as below:

XML
<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:

C#
function validateThirdPartyRate(radGridId) {
    var grid = $find(radGridId).get_element();
    var commissionAmt = $telerik.findElement(grid, "rdtbTPCCommissionAmount");

C#
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.

SQL
commissionAmt = DirectCast(editedItem.FindControl("rdtbTPCCommissionAmount"), RadNumericTextBox).Text


So suggestion will be welcome to to fix this issue?
Posted
Updated 24-Dec-13 1:54am
v2
Comments
Sergey Alexandrovich Kryukov 24-Dec-13 2:32am    
Why not asking their customer service? This is a commercial proprietary product...
—SA
JoCodes 24-Dec-13 2:37am    
Agree with SA...
Goel Himanshu 27-Dec-13 8:09am    
Thanks SA. I had already put a query on thier website and got the answer on below link. I wanted to get the answer quickly so put the same question on code project also:
http://www.telerik.com/community/forums/aspnet-ajax/grid/telerik-radnumerictextbox-not-returning-updated-value-which-is-set-from-client-side-javascript.aspx

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900