You can use a class to do the selecting if you want (as others have mentioned), but to me, if you are adding a class for just that purpose and you have an ID you can select with, it seems like a waste.
I created a very simple example and it shows that the way you are doing it (with [id$=txtField] as your selector does indeed work with the plugin. Here's the .aspx code:
<head runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.autocomplete.min.js"></script>
<link type="text/css" href="jquery.autocomplete.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$('[id$=txtTest]').autocomplete(["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "pearl"], {
mustMatch: true
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView runat="server" ID="grdView" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox runat="server" ID="txtTest" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
And here's the codebehind updates needed to run the test:
protected void Page_Load(object sender, EventArgs e)
{
List<string> data = new List<string>();
data.Add("test");
data.Add("test2");
this.grdView.DataSource = data;
this.grdView.DataBind();
}
If you create a test webapp with this as your test page and run it, the autocomplete will work just fine.
Since this is not working for your app, you need to check to make sure that the selector you are using ([id$=txtEditIngredients]) actually matches something. To test this, put this code in place before it in your document.ready event:
alert($('[id$=txtEditIngredients]').size());
This should alert a number with the number of rows in your GridView. If it doesn't, view the source and find that text field in one of your rows to see what the ID is, and adjust your selector accordingly.
Edit: I just wanted to add that I use the [id$=controlName] all the time in jQuery/.Net because of the .Net control naming structure and it works fine every time, so this should not be an issue at all.