List Info

Thread: C-Sharp (C#) Group: DataGrid Printing in a Web Form




C-Sharp (C#) Group: DataGrid Printing in a Web Form
user name
2006-08-10 09:56:15
Hi,

I have this problem with DataGrid printing.

I have a page which contains only DataGrid. When i try to
print the
page, only 1st page contains the verticle and horizontal
lines of the
grid. The rest of the pages do not contain any lines.


Second thing, between pages while printing there are some
word break of

a line. I dont want this line break.


Can anybody help me with this??
Help would be highly appreciated.

Is there any way with which i can render the full control to
the
printer so that everything prints fine.

ONE MORE THING is that the printing has to be done at CLIENT
SIDE.


Thanks in advance. 
Jay Mehta


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: DataGrid Printing in a Web Form
user name
2006-08-10 11:36:32
As far as I can see there are two issues here:

1. Inconstancy between screen and print layout
2. You want to print the full DataGrid without pagination

For #1 your best approach is to do a view source on the HTML output, save it and then tweak the HTML output until it gives you what you want. Once it does you can replicate the changes inside the DataGrid control. Additionally you should be aware that the largest safe page width for printing on A4 without scaling is 560px, make sure the DataGrid does not exceed this width otherwise you will have printing problems.

With #2 a Print is simply the page the user is viewing output to the printer, it makes no calls to the server so you can't reveal all of the DataGrid just to the printer. There are two ways round this problem:
  ;   - Printer friendly page: Have a page that is specifically customised for printing and displays all the datagrid results, the page the original datagrid sits on links to this
     - Allow the user to select number of results displayed per page and have one of the options "All"

Liam

On 8/10/06, Jay <gmail.com">jaymehta18gmail.com> wrote:

Hi,

I have this problem with DataGrid printing.

I have a page which contains only DataGrid. When i try to print the
page, only 1st page contains the verticle and horizontal lines of the
grid. The rest of the pages do not contain any lines.


Second thing, between pages while printing there are some word break of

a line. I dont want this line break.


Can anybody help me with this??
Help would be highly appreciated.

Is there any way with which i can render the full control to the
printer so that everything prints fine.

ONE MORE THING is that the printing has to be done at CLIENT SIDE.


Thanks in advance.
Jay Mehta



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )