Question

I have 2 textbox as shown in code below :

<telerik:GridTemplateColumn UniqueName="guarantyAmount" HeaderText="<%$Resources:Strings,amount  %>">
                <ItemTemplate>
                    <asp:Label Text='<%# Eval("WARRANTY_AMOUNT")%>' runat="server" id="warrantyAmountText">
                        </asp:Label>
                </ItemTemplate>
               <EditItemTemplate>

                   <telerik:RadNumericTextBox runat="server" id="warrantyAmount" ClientEvents-OnValueChanging="warrantyAmount_ValueChanging"></telerik:RadNumericTextBox>
                    </EditItemTemplate>
               </telerik:GridTemplateColumn>


          <telerik:GridTemplateColumn UniqueName="guarantyRealValue" HeaderText="<%$Resources:Strings,realValue  %>">
                <ItemTemplate>
                    <asp:Label Text='<%# Eval("REAL_VALUE")%>' runat="server" id="realValueText">
                        </asp:Label>
                </ItemTemplate>
               <EditItemTemplate>

                   <telerik:RadNumericTextBox runat="server" id="realValue"></telerik:RadNumericTextBox>
                    </EditItemTemplate>
               </telerik:GridTemplateColumn>

what i want is to create " warrantyAmount_ValueChanging " js function that read input value from "warrantyAmount " textbox and put them in "realValue" ..

how can i achieve that ??

Was it helpful?

Solution

Please try with the below code snippet.

function warrantyAmount_ValueChanging(sender, args) {
            var SenderId = sender.get_id();
            var realValue = $telerik.findTextBox(SenderId.replace("warrantyAmount", "realValue"));
            realValue.set_value(args.get_newValue());
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top