hoony's web study

728x90
반응형

안녕하세요. 
새벽까지 내리던 비가 그쳐서 그런지 공기가 아주 좋네요. 

jquery Datatable plugin 

Datatable 을 사용하다보면 사용자에게는 안 보이게 처리하고 개발자만 써야할때 처리하는 방법입니다.
매번 적응이 될듯하다가도 까먹네요. 
역시 기억보다는 기록을 믿어야할 것같아서 이렇게 글을 쓴답니다.

https://datatables.net/examples/basic_init/hidden_columns.html

 

DataTables example - Hidden columns

Hidden columns There are times when you might find it useful to display only a sub-set of the information that was available in the original table. For example you might want to reduce the amount of data shown on screen to make it clearer for the user (con

datatables.net

참고한 URL은 위와 같구요. 
사용하실때는 

columnDefs: [
                // Center align both header and body content of columns 1, 2 & 3
                { className: "dt-center", targets: [ 0, 1, 2,3,4 ] },
                {
                    "targets": [ 4 ],
                    "visible": false
                }


            ],

위에서 targets 에 해당 컬럼을 지정하시고  visible은 false로 지정을 하시면 됩니다.
즐거운 코딩생활을 위해서 오늘도 기록하나를 남기네요. ^^ 

728x90

공유하기

facebook twitter kakaoTalk kakaostory naver band
loading