Print Button Issue.

Print Button Issue.

ajinkya_aherajinkya_aher Posts: 8Questions: 0Answers: 0
edited November 2013 in TableTools
Hii,


My datatable has column with link as data and delete icon in one column, whenever I print this table it also shows the link for text in column and delete button in column. 'mColumns': [1, 2] didn't solved my issue. is there any other settings.

Replies

  • ajinkya_aherajinkya_aher Posts: 8Questions: 0Answers: 0
    Well this is not perfect I think so, but It solved my problem.

    var closePrintView = function (e) {
    if (e.which == 27) {
    $("#grid th:first-child, #grid td:first-child").show();
    $("#grid th:last-child, #grid td:last-child").show();
    $("#grid").removeClass("active");
    a = 0;
    }
    };


    'fnClick': function (nButton, oConfig) {
    this.fnPrint(true, oConfig);
    a = 1;
    $(window).keyup(closePrintView);
    }

    "fnDrawCallback": function (oSettings) {

    if (a == 1) {
    $("#grid th:first-child, #grid td:first-child").hide();
    $("#grid th:last-child, #grid td:last-child").hide();
    $("#grid").addClass("active");
    }

    }
  • allanallan Posts: 61,431Questions: 1Answers: 10,048 Site admin
    The mColumns option doesn't currently work with the Print button. It will be made to do so in the next major revision of TableTools.

    Allan
This discussion has been closed.