locked
Searchable drop down list in asp.net RRS feed

  • Question

  • User229488726 posted

    In my project i have 5 drop down list 

    when page load 1 st drop down list bind the in every selected index change bind  rest of the drop down list 

    my requirement is every drop down in searchable 

    this is my jquery code

    <script type="text/javascript" src="http://jsearchdropdown.sourceforge.net/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="http://jsearchdropdown.sourceforge.net//jquery.searchabledropdown.js"></script>
    <script type="text/javascript">

    $(document).ready(function () {
    debugger;
    $(document.getElementById('<%=DDLBankName.ClientID%>')).searchable();
    $(document.getElementById('<%=DdlState.ClientID%>')).searchable();
    $(document.getElementById('<%=DdlDistrict.ClientID%>')).searchable();
    $(document.getElementById('<%=DdlCity.ClientID%>')).searchable();
    $(document.getElementById('<%=DdlBranch.ClientID%>')).searchable();

    });
    </script>

    when page load 1 drop down bind it searchable but after select any item then drop down not searchable 

    and the main problem is only 1st drop down is searchable rest of the 4 drop down not searchable how to solve the problem please help me 

    Wednesday, March 2, 2016 6:57 AM

Answers

  • User61956409 posted

    Hi brajalalbrp,

    code is not working ..

    Firstly, please check the API documentation of searchabledropdown plugin to learn the usage of it. and you could share us more information (or link) of searchabledropdown plugin you are using.

    Secondly, you could check if any javascript error present on Console tab.

    Best Regards,

    Fei Hansss

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 9, 2016 6:30 AM

All replies

  • User61956409 posted

    Hi brajalalbrp,

    Firstly, please try to use the following code to attach jQuery searchable to dropdown.

    $('#<%=DDLBankName.ClientID%>').searchable();

    Secondly, it seems that you populate the rest of the dropdowns on the first dropdown change event. You could try to attach jQuery searchable to the rest of dropdowns after you populate dropdowns.

    $('#<%=DDLBankName.ClientID%>').change(function () {
        //populate the rest of dropdowns
        //attach jQuery searchable 
        $('#<%=DdlState.ClientID%>').searchable();
        //...
    })
    

    Besides, please check the API documentation to learn the usage of jQuery searchable you are using.

    Best Regards,

    Fei Han

    Thursday, March 3, 2016 9:03 AM
  • User229488726 posted

    Thanks for your reply but code is not working ..

    Monday, March 7, 2016 6:59 AM
  • User61956409 posted

    Hi brajalalbrp,

    code is not working ..

    Firstly, please check the API documentation of searchabledropdown plugin to learn the usage of it. and you could share us more information (or link) of searchabledropdown plugin you are using.

    Secondly, you could check if any javascript error present on Console tab.

    Best Regards,

    Fei Hansss

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 9, 2016 6:30 AM