2016-08-31 3 views
0

테이블을 생성 중이며 개별 열을 표시하거나 숨기려고합니다. 내가 달성 할 수없는 것은 모든 열이 나타나고 사용자가 그와 같은 것을 보이거나 숨길 수 있다는 것입니다. jquery 모바일 테이블 사용자 정의

<table border="0" id="proforma" data-role="table" data-mode="columntoggle" class="ui-body-d ui-shadow table-stripe ui-responsive" data-column-button-theme="b" data-column-btn-theme="b" data-column-btn-text="Ver más" data-column-popup-theme="b"> 
 
    <thead> 
 
    <tr class="ui-bar-d"> 
 
     <th class="header_table cliente_table">Cliente</th> 
 
     <th class="header_table real_table">Real (%)</th> 
 
     <th class="header_table proy_table">Proy (%)</th> 
 
     <th class="header_table falta_table">Falta (M$)</th> 
 
     <th class="header_table cod_table" data-priority="5">Código</th> 
 
     <th class="header_table dato_table" data-priority="6">Dirección</th> 
 
    </tr> 
 
    </thead> 
 
</table>
내가 처음으로 처음 4 표시 할이 6 열

는 마지막 두 항상 숨겨져. 하지만 버튼을 눌러 표시/숨기기, 처음 4도 사용자에게 내가 얻을 수없는 옵션을 제공 나타납니다. 데이터 우선 순위

답변

1

열만 토글 목록에 포함되어 있으므로 처음 네 개의 컬럼에 1의 데이터가 우선 순위를 추가된다

<table border="0" id="proforma" data-role="table" data-mode="columntoggle" class="ui-body-d ui-shadow table-stripe ui-responsive" data-column-button-theme="b" data-column-btn-theme="b" data-column-btn-text="Ver más" data-column-popup-theme="b"> 
    <thead> 
    <tr class="ui-bar-d"> 
     <th class="header_table cliente_table" data-priority="1">Cliente</th> 
     <th class="header_table real_table" data-priority="1">Real (%)</th> 
     <th class="header_table proy_table" data-priority="1">Proy (%)</th> 
     <th class="header_table falta_table" data-priority="1">Falta (M$)</th> 
     <th class="header_table cod_table" data-priority="5">Código</th> 
     <th class="header_table dato_table" data-priority="6">Dirección</th> 
    </tr> 
    </thead> 
</table> 
관련 문제