public RadGrid Grid = new RadGrid(); private RadTextBox txtbox = new RadTextBox(); protected override void CreateChildControls() { txtbox.TextChanged += new EventHandler(txtbox_TextChanged); Controls.Add(txtbox); Controls.Add(Grid); txtbox.AutoPostBack = true; txtbox.Attributes.Add("onkeyup","SendTextBox():"); } protected override void OnPreRender(EventArgs e) { ClientScriptManager cs = Page.ClientScript; cs.RegisterStartupScript(this.GetType(), "SendTextBox", "setTimeout('__doPostBack(\'" + txtbox.ID + "\',\'\')', 0);", true); base.OnPreRender(e); } protected void txtbox_TextChanged(object sender, EventArgs e) { // code for searching in grid Grid.Rebind(); }
Check some of steps 1. If you have used any requiredfied validato or reqular expression (Client Validation) Then mention in your textbox property CauseValidation="false" 2. Autopostback="true" in textbox property Hope this will help you
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)