views:

1283

answers:

2

AutoComplete using JQuery in GridView. I want to autocomplete functionality in gridview which is required for bulk update

A: 

Could you go into any more detail about what you are trying to accomplish, your circumstances etc....

Blounty
+1  A: 

You can use something like:

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

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

The elem[@id$=someID] means all tags named 'elem' with the id atribute ending in 'someID'.

This is required because asp.net will change the client id of tags so if you use something like:

<asp:TextBox id="myTextBox" />

the page will contain something like:

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

You need to be aware that using the grid view for bulk update has some serious limitations; most likely the page size will just be too big if you add a couple of validations to the grid input...

Aleris
Thank you, this helped me add autocomplete in a datagrid.
Kelly
had to drop the '@' tho
Kelly