Jquery Autocomplete

Jquery Autocomplete

I'm using jquery autocomplete and it's working fine but I want to use bootstrap <table> in the dropdown list
it worked fine in display but I cannot use <li></li> in <tbody></tbody> so I couldn't get the selected value 
the following is the code 

  1. <div class="col-4">
  2.             <div class="input-group">
  3.                 <span class="input-group-addon"><i class="fa fa-user"></i></span>
  4.                 <input id="txt_Search" type="text" class="form-control" />

  5.                 <span class="input-group-addon"><i class="fa fa-search"></i></span>
  6.             </div>

  7.         </div>
and for jquery code

  1.   <script>
  2.          $(document).ready(function () {
  3.             
  4.              $.widget('custom.mcautocomplete', $.ui.autocomplete, {
  5.                  _create: function () {
  6.                      this._super();
  7.                      this.widget().menu("option", "items", "> :not(.ui-widget-header)");
  8.                  },
  9.                  _renderMenu: function (ul, items) {
  10.                      var self = this,
  11.                          thead;
  12.                      if (this.options.showHeader) {
  13.                          table = $('<div class="table-responsive"></div>');
  14.                          t1 = $('<table class="table  table-hover"></table>').appendTo(table);
  15.                          t2 = $('<thead></thead>').appendTo(t1);
  16.                          tr1 = $('<tr></tr>').appendTo(t2);
  17.                          $.each(this.options.columns, function (index, item) {

  18.                              $('<th>' + item.name + '</th>').appendTo(tr1);
  19.                          });
  20.                          tbody = $('<tbody></tbody>').appendTo(t1);

  21.                          ul.append(table);
  22.                      }
  23.                      $.each(items, function (index, item) {
  24.                          self._renderItem(ul, item);
  25.                      });
  26.                  },
  27.                  _renderItem: function (ul, item) {
  28.                      var t = '',
  29.                          result = '';

  30.                      tr2 = $('<tr></tr>').appendTo(tbody).data('ui-autocomplete-item', item);

  31.                      $.each(this.options.columns, function (index, column) {
  32.                          td1 = $('<td>' + item[column.valueField ? column.valueField : index] + '</td>').appendTo(tr2);
  33.                          t += '<td>' + item[column.valueField ? column.valueField : index] + '</td>'


  34.                      });
  35.                      result = $('<li></li>')
  36.                          .data('ui-autocomplete-item', item)
  37.                          .append('<a class="mcacAnchor"><tr>' + t + '<div style="clear: both;"></div></tr></a>')
  38.                          .appendTo(ul);

  39.                      return result;
  40.                  }
  41.              });
  42.              $("#txt_Search").mcautocomplete({
  43.                  showHeader: true,
  44.                  columns: [{
  45.                      name: 'NATIONALID',
  46.                      width: '150px',
  47.                      valueField: 'NATIONALID'
  48.                  }, {
  49.                      name: 'CustomerName',
  50.                      width: '500px',
  51.                      valueField: 'CustomerName'
  52.                  }, {
  53.                      name: 'LastRentDate',
  54.                      width: '300px',
  55.                      valueField: 'LastRentDate'
  56.                  }],
  57.                  source: function (request, response) {
  58.                      $.ajax({
  59.                          url: '<%=ResolveUrl("~/AjaxControls/AjaxOperations.asmx/SearchCustomer") %>',
  60.                         data: "{ 'p_CustName': '" + request.term + "'}",
  61.                         dataType: "json",
  62.                         type: "POST",
  63.                         contentType: "application/json",
  64.                         success: function (data) {
  65.                             response($.map(data.d, function (item) {
  66.                                 return {

  67.                                     CustomerID: item.split('||')[0],
  68.                                     NATIONALID: item.split('||')[1],
  69.                                     CustomerName: item.split('||')[2],
  70.                                     ExpirationDate: item.split('||')[3],
  71.                                     NATIONALITY_DESCR: item.split('||')[4],
  72.                                     CustomersDebits: item.split('||')[5],
  73.                                     LastRentDate: item.split('||')[6]

  74.                                 }
  75.                             }))
  76.                         },
  77.                         error: function (response) {
  78.                             alert(response.responseText);
  79.                         },
  80.                         failure: function (response) {
  81.                             alert(response.responseText);
  82.                         }
  83.                     });
  84.                 },
  85.                 focus: function (event, ui) {
  86.                     $("#txt_Search").val(ui.item.CustomerName);
  87.                     return false;
  88.                 },
  89.                 select: function (e, ui) {

  90.                     $("#txt_Search").val(ui.item.CustomerName);
  91.                     $("#Customerid").val(ui.item.CustomerID);
  92.                     return false;
  93.                 },
  94.                 minLength: 1

  95.             })

  96.         });

  97.        

  98.     </script>
and this is a print screen for result