Categories | Question details Back To List | ||
Hi,
In my application i have to use the printView function. Along with the print view page we also need to open up the windows print dialog box. So is it okay if we alter the printView function in dhtmlxgrid_nxml.js as given below:
//current code
var d = window.open('', '_blank');
d.document.write(html);
d.document.close();
//Modified code
var d = window.open('', '_blank');
d.document.write(html);
d.document.close();
d.focus();
d.print();// To open the print dialog
I have another doubt regarding the printView generated. I have radio buttons and checkboxes in my actual page which is displayed in the print view as 0's and 1's according to their state. Is there any way that we can display them as checked/unchecked check boxes and radiobuttons. Answer posted by dhtmlx support on Sep 23, 2008 02:04 In can be done by adding the following code before grid intialization: eXcell_ch.prototype.getContent = function(){ return "<img src='"+this.grid.imgURL+"item_chk"+this.cell.chstate+".gif' onclick='new eXcell_ch(this.parentNode).changeState(); (arguments[0]||event).cancelBubble=true; '>"; } eXcell_ra.prototype.getContent = function(){ return "<img src='"+this.grid.imgURL+"radio_chk"+this.cell.chstate+".gif' onclick='new eXcell_ra(this.parentNode).changeState(); (arguments[0]||event).cancelBubble=true; '>"; } mygrid = new dhtmlXGridObject(...); Answer posted by indu_philip on Sep 23, 2008 09:01 thanks a lot!!! :):):) |