Hi,
I'm looking to add a javascript function to the "onkeyup" event of a textbox when it's in InsertMode.
In the Code Behind I have:
And in my javascript function I have:
The issue is that "textBox" is null but textBox2 is not.
So the JQuery find works as expected by Telerik's $find does not.
Any ideas?
In the mean time i'll just use JQuery's method.
Thanks,
~Patrick
I'm looking to add a javascript function to the "onkeyup" event of a textbox when it's in InsertMode.
In the Code Behind I have:
protected void rgItems_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode && rgItems.MasterTableView.IsItemInserted) { GridEditableItem item = (GridEditableItem)e.Item; CheckBox isActive = (CheckBox)item["IsActive"].Controls[0]; //no literal control isActive.Checked = true; TextBox name = item.FindControl("NameTextBox") as TextBox; name.Attributes.Add("onkeyup", "filterGrid('"+ name.ClientID + "')"); } }And in my javascript function I have:
function filterGrid(textBoxID) { var grid = $find('<%= rgItems.ClientID %>'); var textBox = $find(textBoxID); var textBox2 = $("#" + textBoxID); createMatchingGrid(grid, textBox.get_textBoxValue());}The issue is that "textBox" is null but textBox2 is not.
So the JQuery find works as expected by Telerik's $find does not.
Any ideas?
In the mean time i'll just use JQuery's method.
Thanks,
~Patrick