Print a datagrid from aspx page?

Discussion in 'ASP .Net' started by Jason, Sep 21, 2004.

  1. Jason

    Jason Guest

    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
     
    Jason, Sep 21, 2004
    #1
    1. Advertising

  2. Jason

    i. Wiin Guest

    All of your answers are here...

    http://www.c-sharpcorner.com/Graphics/DataGridPrinterMG.asp

    Enjoy!


    "Jason" <> wrote in message
    news:esr$...
    > 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
    >
    >
     
    i. Wiin, Sep 21, 2004
    #2
    1. Advertising

  3. Jason

    i. Wiin Guest

    Whoops. Sorry. That link I provided was for Client Apps, not for ASPX web
    pages.


    "Jason" <> wrote in message
    news:esr$...
    > 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
    >
    >
     
    i. Wiin, Sep 21, 2004
    #3
  4. Jason

    bruce barker Guest

    the most common approach is to supply a print version of the page, which
    only included the grid.

    -- bruce (sqlwork.com)


    "Jason" <> wrote in message
    news:esr$...
    > 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
    >
    >
     
    bruce barker, Sep 22, 2004
    #4
  5. 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" <> wrote in message
    news:esr$...
    > 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
    >
    >
     
    Eliyahu Goldin, Sep 22, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    994
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  2. Marco Antonio Montalvo Durán
    Replies:
    2
    Views:
    4,151
    Matt Morris
    Jan 23, 2004
  3. John M
    Replies:
    1
    Views:
    1,196
    Kumar Reddi
    May 29, 2005
  4. keto
    Replies:
    0
    Views:
    968
  5. David Cournapeau

    print a vs print '%s' % a vs print '%f' a

    David Cournapeau, Dec 30, 2008, in forum: Python
    Replies:
    0
    Views:
    364
    David Cournapeau
    Dec 30, 2008
Loading...

Share This Page