asp.net - How to create a table with header using append jquery function? -


i have created table , getting data want header in table.kindly me out.

my code

 <script type="text/javascript">      function pageload(sender, args) {         $(function () {             $("#<%=txtcu.clientid %>").autocomplete({                 source: function (request, response) {                     $.ajax({                         url: '<%=resolveurl("~/webservice.asmx/getcus") %>',                         data: "{ 'prefix': '" + request.term + "'}",                         datatype: "json",                         type: "post",                         async: false,                         mustmatch: true,                         contenttype: "application/json; charset=utf-8",                         success: function (data) {                             response($.map(data.d, function (item) {                                 return {                                     label: item.split('^')[0],                                     val: item.split('^')[1]                                 }                             }))                         },                         error: function (response) {                          },                         failure: function (response) {                          }                     });                 },                 select: function (e, i) {                     $("#<%=hdncr.clientid %>").val(i.item.val);                     if (i.item.val == "no records found") {                         $("#<%=hdncr.clientid %>").val(-1);                         document.getelementbyid('<%=txtcu.clientid%>').value = "";                         return false;                     }                     checkddlcustomerinfo();                 },                 minlength: 0             }).bind('focus', function () { $(this).autocomplete("search"); })             .data("autocomplete")._renderitem = function (ul, item) {                  return $("<li></li>").data("item.autocomplete", item).append("<div><table><tr><td width='200px'>" + item.label + "</td>" + "<td width='110px'>" + item.val.split('~')[6] + "</td>" + "<td>" + item.val.split('~')[4] + "</td></tr></table></div>").appendto(ul);               };         });     }   </script> 


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -