@Blacky
This seems to be a pretty straight forward problem.
What you want to do is create a style sheet that will be applied to your page when the user is Printing.
It's just like a normal style sheet but is only applied to the page when the page is printing.
You'd add it to your page exactly as you would add a normal style sheet to the page, except that you would change the media to "print". For example:
-
<link type="text/css" rel="stylesheet" media="print" href="~/PrintStyle.css"></link>
In this style sheet you would create a class with "overflow:none" that you can apply to your div. When you do this the scroll bars will not be printed.
For example, you may have the CSS class defined in your page's style sheet, which is used by the <div> that contains your grid, so that scroll bars will be displayed:
-
.mainDivStyle{
-
overflow:auto;
-
height: 150px;
-
width: 250px;
-
}
In order to remove the scroll bars when the page is being printed you would add the same class to your print style sheet but change the overflow style:
-
.mainDivStyle{
-
overflow:none;
-
height: 150px;
-
width: 250px;
-
}
Now when the page is being viewed in the browser the <div> will have scroll bars. But when the page is being printed, there will be no scroll bars.
For more information please see
w3c.
-Frinny