Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
Dropdown search doesn't work on modal in paramquery

I'm using a modal and when I try to use my dropdown search it doesn't work, but it works in a normal page.

How can I make it work in the modal? I should be able to search customer name in dropdown.

<div class="form-group">
  <label class="control-label col-md-2"></label>
  <div class="col-md-8">
    @Html.DropDownList("CustomerID", Enumerable.Empty<SelectListItem>(), null, new { @multiple = "multiple", @id = "CustomerID", @class = "form-control" })   
  </div>
</div>
$(document).ready(function() {
  debugger;

  $("#CustomerID").pqSelect({
    singlePlaceholder: '',
    width: '92%'
  });

  $.ajax({
    url: "/TicketDashboard/GetCustomer",
    method: "Post",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(data) {
      $("#CustomerID").empty();

      $.each(data, function(index, value) {
        debugger;
        $('#CustomerID').append('<option value="' + value.CustomerID + '">' + value.CustomerName + '</option>');
      });

      $("#CustomerID").pqSelect("refreshData");
      $('span[data-valmsg-for="OpportunityAttachmentViewModel.CCMail"]').html('Boş geçilemez.');
    }
  });
});

$("#CustomerID").pqSelect({
  singlePlaceholder: '',
  multiplePlaceholder: 'Müşteri Seçiniz',
  maxSelect: 1,
}).on("change", function(evt) {
  pccmail = $(this).val();

  if (pccmail != "") {
    $('span[data-valmsg-for="OpportunityAttachmentViewModel.CCMail"]').html('');
  } else {
    $('span[data-valmsg-for="OpportunityAttachmentViewModel.CCMail"]').html('Boş geçilemez');
  }
  $('[id^=CCMailinput]').val(pccmail);
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!