locked
chzn-select not filtering on my dropdownlist data RRS feed

  • Question

  • User-807418713 posted

    Hello

    This is my code in updatepanel and my aspx page is with masterpage

    <link rel="stylesheet" href="bootstrap.min.css" />
    <link rel="stylesheet" href="Style/chosen.css" />
    <script type="text/javascript" src="jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="bootstrap.min.js"></script> 
    
     <script src="Scripts/chosen.jquery.js" type="text/javascript"></script>
     <script type="text/javascript">
            $(function () {
                $(".chzn-select").chosen({
                    search_contains: true                
                 });
                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                    //Binding Code Again
                    $(".chzn-select").chosen({
                    search_contains: true                
                 });
                }
            });
        </script>

    This is my dropdownlist data

    05-Apr-ABC-200
    06-Apr-KLM-500
    07-Apr-ABC-05
    07-Apr-MNB-400

    If i write something 5 its not showing all related data to 5 

    Whatever i write it should show all realted data 

    Thanking You

    The Above Code Is Not Wroking If My Page Is in Masterpage 

    Monday, July 22, 2019 5:39 PM

Answers

  • User475983607 posted

    If i write something 5 its not showing all related data to 5 

    Can you clarify?  The result set contains a "5" but the chozen library is not showing the record?

    The Above Code Is Not Wroking If My Page Is in Masterpage 

    The master page cannot have a [WebMethod].  

    Other than that, the code shown is not enough to get a clear picture of the design or what is really happening.  I recommend that you troubleshoot by running the code through the Visual Studio debugger and the browser's dev tools.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 22, 2019 5:58 PM

All replies

  • User475983607 posted

    If i write something 5 its not showing all related data to 5 

    Can you clarify?  The result set contains a "5" but the chozen library is not showing the record?

    The Above Code Is Not Wroking If My Page Is in Masterpage 

    The master page cannot have a [WebMethod].  

    Other than that, the code shown is not enough to get a clear picture of the design or what is really happening.  I recommend that you troubleshoot by running the code through the Visual Studio debugger and the browser's dev tools.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 22, 2019 5:58 PM
  • User-807418713 posted
    Hello

    If my above code is in master page then its not working
    Tuesday, July 23, 2019 4:50 PM
  • User475983607 posted

    If my above code is in master page then its not working

    What does "not working" mean?  Can you explain how the chzn-select gets data?  Have you tried basic troubleshooting like opening dev tools (F12) and looking for any errors in the network trace or the console?  Have tried setting a break point on the server side?  

    Tuesday, July 23, 2019 5:28 PM
  • User-807418713 posted
    Hi

    I tried but no error but its not filtering realted data but it filtering only first word so on words..

    Seach contain : true not working if my aspx in with master page
    Wednesday, July 24, 2019 6:30 PM
  • User-1174608757 posted

    Hi Gopi.MCA,

    Could you please post all your code in front end ? It will help use reproduce your problem.

    Best Regards

    Wei

    Friday, July 26, 2019 5:54 AM