3

I am trying to hide couple of columns based on drop down selection.Tried all the possibilities but nothing working out for me. Here is my source,

My fooTable HTML,

<table class="footable table" id="M-AMA-AUT-401-00NP_fooTable" data-sort="false" >
    <thead>
        <tr class="fooTable-Header-Color">
        <th id="th_Omselement">OMS Element</th>
        <th id="th_OmsDomain">OMS Domain</th>
        <th data-sort-ignore="true" data-hide="phone">Priority</th>
        <th data-sort-ignore="true" data-hide="phone">Finding</th>
        <th data-sort-ignore="true" data-hide="phone">Comments</th>
        <th data-sort-ignore="true" data-hide="phone">Finding type</th>                                                             
        </tr>
    </thead>
 </table>

My code,

             if($typeSelected=='OMS'){
                $('.footable').data('footable').reset();
                $('#th_Omselement').data("hide", "");    
                $('#th_OmsDomain').data("hide", "");

                $('.footable').data('footable').footable();

                /*$("#th_Omselement").show();
                $("#th_OmsDomain").show();
                $('#'+id+'_td_Omselement').show();
                $('#'+id+'_td_OmsDomain').show();*/
            }
            else {
                $('.footable').data('footable').reset();
                $('#th_Omselement').data("hide", "all");
                $('#th_OmsDomain').data("hide", "all");
                $('.footable').data('footable').redraw();

/*              $("#th_Omselement").hide();
                $("#th_OmsDomain").hide();
                $('#'+id+'_td_Omselement').hide();
                $('#'+id+'_td_OmsDomain').hide();*/
            }
Ris
  • 1,152
  • 7
  • 29
  • 63

0 Answers0