As the user types into the textbox i want to display the results in the grid based on the value in the textbox.
I have hooked up the onkeyup event for the textbox to do a postback.
My code is:
aspx:
<
script>
function
movetoend()
{
var range = document.selection.createRange();
range.moveStart(
"textedit");
range.select();
}
</script>
<telerik:RadTextBox ID="RadTextBoxName" runat="server" TabIndex="1" onfocus="movetoend()"
OnTextChanged="RadTextBoxName_OnTextChanged">
</telerik:RadTextBox>
aspx.cs code:
protected
void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadTextBoxName.Attributes.Add(
"onkeyup", "setTimeout('__doPostBack(\\'" + RadTextBoxName.ClientID.Replace("_", "$") + "\\',\\'\\')', 0);");
}
}
protected
void RadTextBoxName_OnTextChanged(object sender, EventArgs args)
{
soNameSearch(RadTextBoxName.Text);
RadTextBoxName.Focus();
}
The problem is with the postback there is a page flash each time the grid reloads.
How can i avoid the page flash?
Can you guide me towards the right approach to achieve the desired functionality?