This is a migrated thread and some comments may be shown as answers.

RadTextBox textchanged event

0 Answers 54 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Neetha
Top achievements
Rank 1
Neetha asked on 19 Nov 2014, 06:10 PM
RadTextBox textchanged event is firing before i finish typing the text in the textbox.
SO i am trying to use onblur clientside event. After user types the text there is some server side db call will be made.
How to accomplish this?

My code:

  <telerik:RadTextBox ID="txtPurchaseOrder" AutoPostBack="true"  runat="server" EmptyMessage="" MaxLength="30" style="text-transform: uppercase;" >
              <ClientEvents OnKeyPress="OnKeyPress" OnBlur="Blur" />      
              </telerik:RadTextBox>
function Blur(sender, eventArgs) {
          //Need to call server side method POChange() from here,  PageMethods.POChange(); not working
        }


code-behind:
 protected void POChange()
        {
            if (txtPurchaseOrder.Text != "")
            {
                string strSoOrder = BookingData.CheckPONumer(txtPurchaseOrder.Text);
                if (strSoOrder != null || strSoOrder != "")
                {
                    txtPurchaseOrder.Attributes.Add("onblur", "javascript:return confirm('The Purchase Order used is the same used on previous SO# do you want to continue?');");
                }
            }
        }

No answers yet. Maybe you can help?

Tags
Ajax
Asked by
Neetha
Top achievements
Rank 1
Share this question
or