.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani

Home >> Forum >> JQuery >> Post New QuestionBookmark and Share Subscribe to Forum

Autocomplete within gridview using Jquery in C#.net 3.5

Posted By: `Amit     Posted Date: February 02, 2011    Points:2   Category :JQuery
I want to apply autocomplete in gridview (in asp.net3.5 with C#) using jquery and this

gridview is within the ajax update panel<asp:UpdatePanel ID="UpdatePanel1" runat="server">

For this i am using method within the <ItemTemplate>

$('[id$=txtItemCode]').autocomplete("SearchItem.aspx").result(function (event, data,

formatted) {
if (data) {
alert('Value: '+ data[1]);

else {

since in gridview the textbox id is <asp:TextBox id="txtItemCode" /> but

on browser such as <input type="textbox" id="ctl00_otherName_101txtItemCode" />
and then for the next row same textbox id is now
<input type="textbox" id="ctl00_otherName_102txtItemCode" />

i tried
1. put this code within the <ItemTemplate>
2. <%= txtItemCode.ClientID %>
3. $("*[@id$=theGridId] input[@id$=txtItemCode]")

but autocomplete does not work in all the cases

plz help me.

Author: Narayanan             
Posted Date: September 26, 2011     Points: 20   

Refer this site. It may be useful your task..

Regards, Lakshmi Naraayanan.S

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend