jquery datatables hide column

前端 未结 13 1359
灰色年华
灰色年华 2020-12-02 11:59

Is there a way with the jquery datatables plugin to hide (and show) a table column?

I figured out how to reload the table data: using fnClearTable and <

13条回答
  •  独厮守ぢ
    2020-12-02 12:29

    You can try as below to hide/show dynamically runtime

    Hide : fnSetColumnVis( 1, false, false );

    Example: oTable.fnSetColumnVis(item, false,false);

    Show : fnSetColumnVis( 1, true, false );

    Example: oTable.fnSetColumnVis(item, false,false);

    Here, oTable is object of Datatable.

提交回复
热议问题