Sigma Php Ajax framework, Ajax Components, GUI Builder
February 11, 2012, 06:48:12 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Print Preview option in sigma grid ?  (Read 1639 times)
redhat
Jr. Member
**
Posts: 19


View Profile
« on: June 17, 2009, 10:58:54 PM »

Hi i am using sigma grid in my application , i need to know weather print preview option is available in our sigma grid (i.e) weather it is possible to view the grid items before printing

Thanks in advance
Logged
steven
Moderator
Hero Member
*****
Posts: 546



View Profile
« Reply #1 on: June 17, 2009, 11:35:59 PM »

No.  But there should be.
I will get it back to our developers
Logged

Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
vijay4281
Newbie
*
Posts: 2


View Profile
« Reply #2 on: July 28, 2009, 04:44:37 AM »

Just write the innerHtml of D using document.write(), D is in printGrid function which is located in gt_grid_all.js

Example :

//Altered Area
    var pp = window.open('','printPopup','width=900,height=500,resizable=1,scrollbars=yes,top=50,left=50')
   pp.close();
   //Adding HTML opening tag with <HEAD> … </HEAD> portion
   pp = window.open('','printPopup','width=900,height=500,resizable=1,scrollbars=yes,top=50,left=50,bgcolor=red')
   pp.document.writeln('<LINK href="../css/PrintStyle.css"  type="text/css" rel="stylesheet" media="print"><base target="_self">')
   pp.document.writeln('<HTML><HEAD><title>:: Print Preview ::</title><LINK href=Styles.css  type="text/css" rel="stylesheet">')
   pp.document.writeln('<link type="text/css" rel="stylesheet" href="../includes/global.css" />')
   
   pp.document.writeln('<body MS_POSITIONING="GridLayout" bottomMargin="0" class="total-bg" leftMargin="0" topMargin="0" rightMargin="0">');
   //Adding form Tag
   pp.document.writeln('<form  method="post">');
   //Creating two buttons Print and Close within a table
   
   var currentTime = new Date()
      
    var m_names = new Array("Jan", "Feb", "Mar",
    "Apr", "May", "Jun", "Jul", "Aug", "Sep",
    "Oct", "Nov", "Dec");

    var currentTime = new Date();
    var curr_date = currentTime.getDate();
    var curr_month = currentTime.getMonth();
    var curr_year = currentTime.getFullYear();
    var CurrentDate=curr_date + "-" + m_names[curr_month]
    + "-" + curr_year+" ";
   
    var hours = currentTime.getHours();
    var minutes = currentTime.getMinutes();
    var seconds = currentTime.getSeconds()
    var timeValue = "" + ((hours >12) ? hours -12 :hours)
    if (timeValue == "0") timeValue = 12;
    timeValue += ((minutes < 10) ? ":0" : ":") + minutes
    timeValue += ((seconds < 10) ? ":0" : ":") + seconds
    timeValue += (hours >= 12) ? " P.M." : " A.M."
    var CurrentDT=CurrentDate + timeValue;
    pp.document.writeln('<Table width="100%" border="0" cellspacing="0" cellpadding="0" ><tr> <td> <TABLE width=\'100%\' border="0" cellspacing="0" cellpadding="0"><TR><TD></TD></TR><TR class="tile-td"><td class="username" align="center">Date: '+CurrentDT+'</td><TD align=right style="padding:20px 0px 20px 0px"><img ID="btnPrint" src="../images/print1.gif" style="cursor:pointer" onclick="javascript:location.reload(true);self.print()">&nbsp;</TD></TR><TR><TD></TD></TR></TABLE></td></tr>');
    D = D.split("<table").join("<table align='Center'");
    D = D.split("<TD").join("<TD style='width:auto; padding-right:15px;'");
    D = D.split("border=\"0\"").join("border=\"1\"");
         
    D = D.replace("href"," ");
   

    pp.document.writeln('<TR class="tile-td"><TD  style="padding:20px 0px 20px 0px" >')
    pp.document.writeln(D);
   
    pp.document.writeln('</TD></TR>');   
   
   
    pp.document.writeln('</TD></TR><tr><td colspan="4" align="center" style="padding-bottom:30px;" class="tile-td"><img ID="CLOSE" src="../images/close.jpg" style="cursor:pointer" onclick="javascript:window.close();" ></td></tr></TABLE></td></tr></Table>');
   
    pp.document.writeln('</form></body></HTML>');
   
     var Obj=parent.document.getElementById("ctl00_ContentPlaceHolder1_btnGenerate");
    if(Obj)Obj.click();     
   
    return;
   
   
    //End



Try this otherwise mail me to bharathi.net@gmail.com.

Thank You  Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!