Reylin Mathew

Reylin Mathew

  • NA
  • 347
  • 75.6k

how to print multiple data using jq.

Jun 17 2019 3:05 AM
in my grid 3 rows are there. 2 rows are select and print button pres. but the last data is print,fisrt data is lose .i want 2 data print in separatly.
 
this is my sample code..
 
function Print() {
debugger;
$("#btnPt").show();
$("#btnPClose").show();
var PrintData=0;
var ID = new Array();
var selectedRows = objDats.rows('.selected').data();
for (var i = 0; i < selectedRows.length; i++) {
DEPOSIT_ID.push(selectedRows[i][1]); //ID
PrintData++
}
for(var j= 0; j < PrintData.length; j++){
console.log(DEPOSIT_ID[j]);
}
 
var strHeaderContent = $('#tempReceipt').html();
$('#tempReceipt').css({ height: "0px" });
var strContentArea = $('#contentArea').html()
$('#contentArea').css({ height: "0px" });
$('#tempReceipt').html('');
var strdemostr = $('#demostr').html()
$('#demotsr').css({ height: "0px" });
$('#testprnt').html('');
//#region prntdesgn
var htmlToPrint = '<div style="border:3px solid red; width:95%; margin:0 auto; padding:10px;"><table cellpadding="0" cellspacing="0" border="0" width="100%">' +
'<tr><td align="center" valign="top" colspan="2"><img src="s" /><br /><h3 class="title">test</h3><br />' +
'<label>test</label><br /><label>test</label><br /><label class="p-title">test</label><br />' +
'(test)</td></tr>';
//#endregion prntdesgn
$("#printable").show();
 
Plz help me 
Thnkx in advce.. :) 

Answers (1)