:: Forum >> Version 2 >>

printing - again: grid 2.5.3

I have been looking through the forums for a good solution for printing, From what I have read I have a few questions.

To print the grid do you call window.print() ???
I see a new style @media print,

@media print { 

.
aw-grid-control
.
aw-grid-box
.
aw-scroll-bars
.
aw-bars-content
.
aw-hpanel-template
.
aw-hpanel-box
.
aw-hpanel-top
.
aw-hpanel-middle
.
aw-hpanel-bottom
.
aw-grid-view
.
aw-view-top 
    
displayblock!important
    
position: static!important
    
widthauto!important
    
heightauto!important
    
padding0px!important


.
aw-grid-headers
.
aw-grid-footers
.
aw-grid-row 
    
widthauto!important


.
aw-bars-box
.
aw-column-space
.
aw-selector-space 
    
displaynone!important

 
can I just add the style as I create my grid? I have tried this but when using, no rows are visable, only the header. If I dont use the print styling I have an issue (which a few people seem to have) where only one page of data will be printed. I have tried removing the scroll bars and set height to, say 2000px but still only one page will be printed.

Is it possible for some one to post a comprehensive method in printing the grid? Ideally how you call the print method and the styling you use?
trev
Wednesday, October 15, 2008
thought I should add my style for the grid when printing. This will result in only the last rows of the grid being printed:

drawStr "<style type=""text/css"">" vbCrLf
        drawStr 
+= "#myGrid {height: 2000px; width: 680px; margin-right:auto; margin-left:auto; border:none; padding-top:10px;}" vbCrLf

        
'drawStr += "#myGrid .aw-scroll-bars, .aw-scroll-left, .aw-scroll-corner {display: none;}" & vbCrLf

        drawStr += "#myGrid .aw-scroll-top { position: absolute; overflow: visible; width: auto!important;  height: auto!important; }" & vbCrLf
        drawStr += "#myGrid .aw-controls-grid { verflow: visible; height: auto; width: auto; }" & vbCrLf
        drawStr += "#myGrid .aw-scroll-data { position: absolute; overflow: visible; width: auto!important; height: auto!important; }" & vbCrLf

        drawStr += "#myGrid .aw-column-0 {text-align:center; width:20px; }" & vbCrLf
        drawStr += "#myGrid .aw-column-1 {text-align:left; width:70px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-2 {text-align:left; width:100px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-3 {text-align:left; width:100px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-4 {text-align:left; width:100px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-5 {text-align:right; width:60px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-6 {text-align:left; width:90px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-7 {text-align:left; width:60px;}" & vbCrLf
        drawStr += "#myGrid .aw-column-8 {width:0px; display:none;}" & vbCrLf

        drawStr += "#myGrid .aw-grid-cell {border-right: 1px solid threedlightshadow;}" & vbCrLf
        drawStr += "#myGrid .aw-grid-row {border-bottom: 1px solid threedlightshadow;}" & vbCrLf

        drawStr += "/* box model fix for strict doctypes, safari */" & vbCrLf
        drawStr += ".aw-strict #myGrid .aw-grid-cell {padding-right: 3px;}" & vbCrLf
        drawStr += ".aw-strict #myGrid .aw-grid-row {padding-bottom: 3px;}" & vbCrLf
        drawStr += "</style>" & vbCrLf
 
trev
Wednesday, October 15, 2008
I have figured out what to do with @media print, create a new css file with the new @media print style. Set the style type to your grid on the page as media="screen".

However I still have the isue where the whole grid is not printed correctly. Current style sheet

@media print  
{  
.
aw-grid-control,  
.
aw-grid-box,  
.
aw-scroll-bars,  
.
aw-bars-content,  
.
aw-hpanel-template,  
.
aw-hpanel-box,  
.
aw-hpanel-top,  
.
aw-hpanel-middle,  
.
aw-hpanel-bottom,  
.
aw-grid-view,  
.
aw-view-top {  
    
displayblock!important;  
    
position: static!important;  
    
widthauto!important;  
    
heightauto!important;  
    
padding0px!important;  
}  

.
aw-grid-headers,  
.
aw-grid-footers,  
.
aw-grid-row {  
    
widthauto!important;  
}  

.
aw-bars-box,  
.
aw-column-space,  
.
aw-selector-space {  
    
displaynone!important;  

}
 
I have tried all others listed in the forum, but none work correctly. This one will only show a small grid with a few rows. Others I have tried will only show the last few rows after printing a couple of blank sheets.

Any help much appreciated!
trev
Thursday, October 16, 2008



This topic is archived.

Back to support forum

Forum search