beforePrint: function (args){
if(args.requestType == "print"){
for(var i=0;i<len;i++){
img = new Image();
img.src = this.element.find(".barcode").children("canvas")[i].toDataURL();
args.element.find(".barcode").eq(i).parent("td").append(img);
}
}
} |
function dataBound(args) {
var len1= this.model.currentViewData.length;
for(var j=0; j<len1; j++){
var num= this.model.currentViewData[j].EmployeeID;
this.element.find(".barcode").eq(j).ejBarcode({text: num.toString(),symbologyType: "qrbarcode"});
}
}
function templateRefresh(args) {
if(!this.initialRender){
var num1 =args.data.EmployeeID;
$(args.cell).find(".barcode").ejBarcode({text: num1.toString(),symbologyType: "qrbarcode"});
}
}
|
<script type="text/x-jsrender" id="columnTemplate">
<div id="{{:EmployeeID}}barcode" class="barcode"></div> //use column with unique rowvalues
<script> |