Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
ASP.Net Searchable/Filterable DropDownList Populated from the Database

I am attempting to search through a DropDownList. The list is populated from the database and not in any explicit front end list. For previous searches, I have used OnKeyUp in a textbox to search through rows. However, in this case there is no search textbox- the search must be done when the user clicks/hovers over the filter. Additionally, and less importantly, the search needs to start after the dash symbol (-) as items in the list start with acronyms as displayed here:

XYZ - Kansas

YBE - Delaware

CIT - New Jersey

The code:

<ASP:DropDownList ID="ddlProgram" AutoPostBack="true" runat="server" />

Any thoughts on this? I found some useful code that may be relevant here but it seems to require a textbox as input and a front end list but the logic seems sound:

function searchSel() 
    {
      var input = document.getElementById('realtxt').value.toLowerCase();

          len = input.length;
          output = document.getElementById('realitems').options;
      for(var i=0; i<output.length; i++)
          if (output[i].text.toLowerCase().indexOf(input) != -1 ){
          output[i].selected = true;
              break;
          }
      if (input == '')
        output[0].selected = true;
    }
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda