Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Print a datagrid from aspx page?

Reply
Thread Tools

Print a datagrid from aspx page?

 
 
Jason
Guest
Posts: n/a
 
      09-21-2004
How might I print a datagrid from an aspx page? Note that I -only- want the
datagrid, not any of the other page objects (no buttons, banner,
dropdownlists, etc therefore printing the entire page via file->print won't
work) and the datagrid's dataview is filtered and sorted.

Any thoughts? Any code examples?

Any help is greatly appreciated.

Thanks in advance,

Jason


 
Reply With Quote
 
 
 
 
i. Wiin
Guest
Posts: n/a
 
      09-21-2004
All of your answers are here...

http://www.c-sharpcorner.com/Graphic...dPrinterMG.asp

Enjoy!


"Jason" <(E-Mail Removed)> wrote in message
news:esr$(E-Mail Removed)...
> How might I print a datagrid from an aspx page? Note that I -only- want

the
> datagrid, not any of the other page objects (no buttons, banner,
> dropdownlists, etc therefore printing the entire page via file->print

won't
> work) and the datagrid's dataview is filtered and sorted.
>
> Any thoughts? Any code examples?
>
> Any help is greatly appreciated.
>
> Thanks in advance,
>
> Jason
>
>



 
Reply With Quote
 
 
 
 
i. Wiin
Guest
Posts: n/a
 
      09-21-2004
Whoops. Sorry. That link I provided was for Client Apps, not for ASPX web
pages.


"Jason" <(E-Mail Removed)> wrote in message
news:esr$(E-Mail Removed)...
> How might I print a datagrid from an aspx page? Note that I -only- want

the
> datagrid, not any of the other page objects (no buttons, banner,
> dropdownlists, etc therefore printing the entire page via file->print

won't
> work) and the datagrid's dataview is filtered and sorted.
>
> Any thoughts? Any code examples?
>
> Any help is greatly appreciated.
>
> Thanks in advance,
>
> Jason
>
>



 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      09-21-2004
the most common approach is to supply a print version of the page, which
only included the grid.

-- bruce (sqlwork.com)


"Jason" <(E-Mail Removed)> wrote in message
news:esr$(E-Mail Removed)...
> How might I print a datagrid from an aspx page? Note that I -only- want

the
> datagrid, not any of the other page objects (no buttons, banner,
> dropdownlists, etc therefore printing the entire page via file->print

won't
> work) and the datagrid's dataview is filtered and sorted.
>
> Any thoughts? Any code examples?
>
> Any help is greatly appreciated.
>
> Thanks in advance,
>
> Jason
>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-22-2004
Jason,

2 client-side events are made specially for your purposes, They are
onbeforeprint and onafterprint. In onbeforeprint you make invisible all
controls you don't want to go to the printout, and in onafterprint you
restore their visual state. All this can be done with a bit of javascript
programming.

Eliyahu

"Jason" <(E-Mail Removed)> wrote in message
news:esr$(E-Mail Removed)...
> How might I print a datagrid from an aspx page? Note that I -only- want

the
> datagrid, not any of the other page objects (no buttons, banner,
> dropdownlists, etc therefore printing the entire page via file->print

won't
> work) and the datagrid's dataview is filtered and sorted.
>
> Any thoughts? Any code examples?
>
> Any help is greatly appreciated.
>
> Thanks in advance,
>
> Jason
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
print a vs print '%s' % a vs print '%f' a David Cournapeau Python 0 12-30-2008 03:19 AM
Problem - I want to print Current Output of Pdf file and should print once.I get print dialog box but it is not working keto Java 0 05-30-2007 11:27 AM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
Unlarging the print to print using PDF file to print Bun Mui Computer Support 3 09-13-2004 03:15 AM
Re: Opening anoter .aspx window from a a .aspx main project. Gerry O'Brien [MVP] ASP .Net 0 04-11-2004 01:36 AM



Advertisments