Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
$("[id$='Show']").on("click", function () {
       try {
           var id = $(this).attr('id');

           var symbol;

           var context;
           if (id.toString().indexOf('Bullish', 0) > 0) {

               symbol = $("#drpBullishSymbol option:selected").text();

               context = $("#AA");
           }
           if (id.toString().indexOf('Bearish', 0) > 0) {

               symbol = $("#drpBearishSymbol option:selected").text();

               context = $("#BA");
           }
           if (symbol.toString().length > 0) {
               $("tr", context).each(function () {
                   if ($('td:eq(0)', this).text() !== symbol) {
                       $(this).hide();
                       //$(this).css('visibility', 'collapse');
                   } else {
                       $(this).show();
                       //$(this).css('visibility', 'visible');

                   }
               });
           }

       } catch (ex) {
           alert("While filtering details : " + ex);
       }
   });

this is my js and i try much but i can't get result what i want so guide me where i m wrong and give solution in this js that i have to change or write.when i click one item of dropdownlist item it show that selected item in grid but when i select another item for show than previous selected item remove from grid and do not want that. whatever item select that all item show in grid no even lose any item from grid so is there any possibilities here in above JS.If there is solution than please let me know its urgent.
Posted
Updated 10-Mar-14 19:59pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900