I have 1 RadNumericTextBox in my GridView in which i will allow user to enter some positive value(numbers only).
Code:
<telerik:RadGrid ID="rgCalculation" datakeynames="ID" runat="server" OnItemDataBound="rgCalculation_ItemDataBound">
<MasterTableView AutoGenerateColumns="false" ClientDataKeyNames="ID">
<telerik:GridTemplateColumn HeaderText="Amount" HeaderStyle-Width="20%">
<ItemTemplate>
<telerik:RadNumericTextBox ID="txtAmount" ClientEvents-OnValueChanged="OnClientValueChanged" MinValue="0" MaxValue="999999999" runat="server" AutoPostBack="true" OnTextChanged="txtAmount_TextChanged" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Records like Interest and Worth are being loaded on ItemDataBound events from database.
Now when textbox1 value is changed i want to compare textbox1 value with textbox2 and if textbox1 value is smaller than texbox2 value then i want to display alert to user that textbox1 value cannot be less than texbox2 and also i want to display alert to user if user enter negative value in any of texbox1 or textbox2.
but here problem is that as both textbox would have same id then how would i get 2nd textbox value.
This is How i am getting first textbox value:
function OnClientValueChanged(sender, args) {
alert(args.get_newValue())
}
So how to get 2nd numeric textbox value??
