Autocomplete with JQuery in GridView

Autocomplete with JQuery in GridView. I want to autocomplete functionality in a gridview which is required for bulk refresh

+1


source to share


1 answer


You can use something like:

jQuery("*[@id$=theGridId] input[@id$=textBoxId]").autocomplete(list)

      

attach jquery autocomplete to all textboxes (html input controls) with textBoxId inside your grid.

The [@id $ = someID] element means all tags named 'elem' with an id attribute ending in 'someID'.

This is necessary because asp.net will change the client id to tags, so if you use something like:



<asp:TextBox id="myTextBox" />

      

the page will contain the following:

<input type="textbox" id="ctl00_otherName_myTextBox" />

      

You should be aware that there are some serious limitations to using a grid view for bulk refresh; most likely the page size will be too large if you add a couple of checks to the grid input ...

+1


source







All Articles