Print HTML by ID
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#btn_print").on("click", function () {
printData();
})
});
function printData() {
var divToPrint = document.getElementById("grdlist");
newWin = window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
}
</script>