Hi, How do I determine the old and new value for WebNumericEdit control in the TextChanged client event? The old value is the initial value when the page was originally rendered and the new value is the user changed value within the browser.
Thanks
Thanks for your response. However, I got it working with the following code -
function txtXTDemand_TextChanged(oEdit, newText, oEvent) {
//Add code to handle your event here.
var oldValue = "";
if (oEdit.elemValue.defaultValue != "")
oldValue = parseInt(oEdit.elemValue.defaultValue);
var newValue = newText;
if (oldValue != newValue) {
//my code goes here
}
Hello Ram,
You have posted your question in WebNumericEditor forum thread.
If you want to access the new and old value in the below way:
<ig:WebNumericEditor ID="WebNumericEditor1" runat="server">
<ClientEvents TextChanged="WebNumericEditor1_TextChanged" />
</ig:WebNumericEditor>
function WebNumericEditor1_TextChanged(sender, eventArgs)
{
var oldText = eventArgs.get_oldText();
var newText = eventArgs.get_text();
If you are using WebNumericEdit I recommend you to use ValueChange client event for the purpose:
<igtxt:WebNumericEdit ID="WebNumericEdit1" runat="server">
<ClientSideEvents ValueChange="WebNumericEdit1_ValueChange" />
</igtxt:WebNumericEdit>
function WebNumericEdit1_ValueChange(oEdit, oldValue, oEvent){
var oldOne =oldValue;
var newValue = oEdit.getValue();
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3?page=Infragistics4.WebUI.WebDataInput.v10.3~Infragistics.WebUI.WebDataInput.WebTextEdit~ClientSideEvents.html
Let me know if you need further assistance regarding this.