jquery - How to apply autocomplete in a textbox of gridview .I am creating dynamic row of gridviwew -


      <script type="text/javascript">                 //alert('hi gridview');                  $(document).ready(function () {                      $('table[id$="gvproduct"] input.txtprodtype').autocomplete({                            source: function (request, response) {                              $.ajax({                                  type: "post",                                  url: "/tally/saletest.aspx/autocompleteprodtype",                                  //data: "{'searchtext':'" + document.getelementbyid('<%=gvproduct.clientid %>').find('input:text[id$="txtprodtype"]').value + "'}",                                  data: "{ 'searchtext' : '" + request.term + "'}",                                  contenttype: "application/json; charset=utf-8",                                  datatype: "json",                                   success: function (data) {                                      response(data.d);                                  },                                    error: function (result) {                                   }                              });                          },                          autofocus: true,                          minlength: 1,                          open: function (event, ui) {                              $('.ui-autocomplete').css('z-index', '99999');                          },                            select: function (event, selectedobject) {                              jquery(this).val(selectedobject.item.value);                          }                       });                   });`enter code here` 

and asp.net design are

 <asp:gridview id="gvproduct" visible="true"  runat="server" showfooter="true" autogeneratecolumns="false">                                                 <columns> 

<%-- --%> ' >

i creating dynamic row in grid view . above code jquery , below design of asp.net


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -